Nimble: Add support for LE Power Control

This commit is contained in:
Rahul Tank
2022-12-30 17:34:05 +05:30
committed by Roshan Bangar
parent f90ce9791f
commit 1ff96d3afb
4 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -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
*
-1
View File
@@ -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);
+1 -2
View File
@@ -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;
+10
View File
@@ -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