mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-11 00:37:23 +00:00
Add support for LE Set Data Related Address change command
This commit is contained in:
committed by
Abhinav Kudnar
parent
1b46f6922f
commit
b8d073bcb0
@@ -2672,6 +2672,17 @@ int ble_gap_set_path_loss_reporting_param(uint16_t conn_handle, uint8_t high_thr
|
|||||||
uint8_t high_hysteresis, uint8_t low_threshold,
|
uint8_t high_hysteresis, uint8_t low_threshold,
|
||||||
uint8_t low_hysteresis, uint16_t min_time_spent);
|
uint8_t low_hysteresis, uint16_t min_time_spent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Data Related Address Changes Param
|
||||||
|
*
|
||||||
|
* @param adv_handle Advertising handle
|
||||||
|
* @param change_reason Reasons for refreshing addresses
|
||||||
|
*
|
||||||
|
* @return 0 on success; nonzero on failure.
|
||||||
|
*/
|
||||||
|
int ble_gap_set_data_related_addr_change_param(uint8_t adv_handle, uint8_t change_reason);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7317,6 +7317,12 @@ ble_gap_set_auto_pcl_param(struct ble_gap_set_auto_pcl_params *params)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
ble_gap_set_data_related_addr_change_param(uint8_t adv_handle, uint8_t change_reason)
|
||||||
|
{
|
||||||
|
return ble_hs_hci_util_set_data_addr_change(adv_handle, change_reason);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ble_gap_deinit(void)
|
ble_gap_deinit(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ int ble_hs_hci_acl_tx(struct ble_hs_conn *conn, struct os_mbuf **om);
|
|||||||
int ble_hs_hci_frag_num_mbufs(void);
|
int ble_hs_hci_frag_num_mbufs(void);
|
||||||
int ble_hs_hci_frag_num_mbufs_free(void);
|
int ble_hs_hci_frag_num_mbufs_free(void);
|
||||||
|
|
||||||
|
int ble_hs_hci_util_set_data_addr_change(uint8_t adv_handle, uint8_t change_reason);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -277,3 +277,17 @@ ble_hs_hci_set_chan_class(const uint8_t *chan_map)
|
|||||||
BLE_HCI_OCF_LE_SET_HOST_CHAN_CLASS),
|
BLE_HCI_OCF_LE_SET_HOST_CHAN_CLASS),
|
||||||
&cmd, sizeof(cmd), NULL, 0);
|
&cmd, sizeof(cmd), NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ble_hs_hci_util_set_data_addr_change(uint8_t adv_handle, uint8_t change_reason)
|
||||||
|
{
|
||||||
|
struct ble_hci_le_set_data_addr_change_cp cmd;
|
||||||
|
uint16_t opcode;
|
||||||
|
|
||||||
|
opcode = BLE_HCI_OP(BLE_HCI_OGF_LE, BLE_HCI_OCF_LE_SET_DATA_ADDR_CHANGE);
|
||||||
|
|
||||||
|
cmd.adv_handle = adv_handle;
|
||||||
|
cmd.change_reason = change_reason;
|
||||||
|
|
||||||
|
return ble_hs_hci_cmd_tx(opcode, &cmd, sizeof(cmd), NULL, 0);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1130,6 +1130,12 @@ struct ble_hci_le_set_transmit_power_report_enable_cp {
|
|||||||
uint8_t remote_enable;
|
uint8_t remote_enable;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
#define BLE_HCI_OCF_LE_SET_DATA_ADDR_CHANGE (0x007C)
|
||||||
|
struct ble_hci_le_set_data_addr_change_cp {
|
||||||
|
uint8_t adv_handle;
|
||||||
|
uint8_t change_reason;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
#define BLE_HCI_OCF_LE_SET_DEFAULT_SUBRATE (0x007D)
|
#define BLE_HCI_OCF_LE_SET_DEFAULT_SUBRATE (0x007D)
|
||||||
struct ble_hci_le_set_default_subrate_cp {
|
struct ble_hci_le_set_default_subrate_cp {
|
||||||
uint16_t subrate_min;
|
uint16_t subrate_min;
|
||||||
|
|||||||
Reference in New Issue
Block a user