nimble/ll: Add function for getting current PHY channel

This is useful for dynamic FEM drivers.
This commit is contained in:
Szymon Janc
2023-05-19 15:50:53 +02:00
parent bd8c96621f
commit 550d5a77ca
5 changed files with 25 additions and 0 deletions
@@ -86,6 +86,7 @@ int ble_phy_init(void);
/* Set the PHY channel */
int ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crcinit);
uint8_t ble_phy_chan_get(void);
#if MYNEWT_VAL(BLE_PHY_VARIABLE_TIFS)
/* Set T_ifs time for next transition */
+6
View File
@@ -1697,6 +1697,12 @@ ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crc_init)
return 0;
}
uint8_t
ble_phy_chan_get(void)
{
return g_ble_phy_data.channel;
}
void
ble_phy_restart_rx(void)
{
+6
View File
@@ -551,6 +551,12 @@ ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crcinit)
return 0;
}
uint8_t
ble_phy_chan_get(void)
{
return g_ble_phy_data.phy_chan;
}
/**
* Disable the PHY. This will do the following:
* -> Turn off all phy interrupts.
+6
View File
@@ -1365,6 +1365,12 @@ ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crcinit)
return 0;
}
uint8_t
ble_phy_chan_get(void)
{
return g_ble_phy_data.phy_chan;
}
/**
* Stop the timer used to count microseconds when using RTC for cputime
*/
+6
View File
@@ -2126,6 +2126,12 @@ ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crcinit)
return 0;
}
uint8_t
ble_phy_chan_get(void)
{
return g_ble_phy_data.phy_chan;
}
/**
* Stop the timer used to count microseconds when using RTC for cputime
*/