mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-02 23:30:02 +00:00
nimble/ll: Add function for getting current PHY channel
This is useful for dynamic FEM drivers.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user