mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-09 02:30:06 +00:00
Nimble: Add support for LE Power Control
This commit is contained in:
committed by
Roshan Bangar
parent
f90ce9791f
commit
1ff96d3afb
@@ -1024,8 +1024,9 @@ struct ble_gap_event {
|
||||
uint8_t delta;
|
||||
} transmit_power;
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_CONN_SUBRATING)
|
||||
/**
|
||||
/**
|
||||
* Represents a subrate change event that indicates connection subrate update procedure
|
||||
* has completed and some parameters have changed Valid for
|
||||
* the following event types:
|
||||
@@ -2264,7 +2265,6 @@ ble_gap_subrate_req(uint16_t conn_handle, uint16_t subrate_min, uint16_t subrate
|
||||
uint16_t max_latency, uint16_t cont_num,
|
||||
uint16_t supervision_timeout);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Event listener structure
|
||||
*
|
||||
|
||||
@@ -95,7 +95,6 @@ void ble_gap_rx_rd_rem_sup_feat_complete(const struct ble_hci_ev_le_subev_rd_rem
|
||||
#if MYNEWT_VAL(BLE_CONN_SUBRATING)
|
||||
void ble_gap_rx_subrate_change(const struct ble_hci_ev_le_subev_subrate_change *ev);
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_POWER_CONTROL)
|
||||
void ble_gap_rx_transmit_power_report(const struct ble_hci_ev_le_subev_transmit_power_report *ev);
|
||||
void ble_gap_rx_le_pathloss_threshold(const struct ble_hci_ev_le_subev_path_loss_threshold *ev);
|
||||
|
||||
@@ -86,8 +86,7 @@ static ble_hs_hci_evt_le_fn ble_hs_hci_evt_le_subrate_change;
|
||||
#endif
|
||||
|
||||
/* Statistics */
|
||||
struct host_hci_stats
|
||||
{
|
||||
struct host_hci_stats {
|
||||
uint32_t events_rxd;
|
||||
uint32_t good_acks_rxd;
|
||||
uint32_t bad_acks_rxd;
|
||||
|
||||
@@ -247,6 +247,16 @@ ble_hs_startup_le_set_evmask_tx(void)
|
||||
* 0x0000000400000000 LE Subrate change event
|
||||
*/
|
||||
mask |= 0x0000000400000000;
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_POWER_CONTROL)
|
||||
if (version >= BLE_HCI_VER_BCS_5_2) {
|
||||
/**
|
||||
* Enable the following LE events:
|
||||
* 0x0000000080000000 LE Path Loss Threshold event
|
||||
* 0x0000000100000000 LE Transmit Power Reporting event
|
||||
*/
|
||||
mask |= 0x0000000180000000;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user