mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-06 18:17:54 +00:00
nimble/phy/nrf5x: Force FEM disable on ble_phy_disable
This commit is contained in:
@@ -1976,6 +1976,10 @@ ble_phy_disable(void)
|
||||
|
||||
ble_phy_stop_usec_timer();
|
||||
ble_phy_disable_irq_and_ppi();
|
||||
|
||||
#if PHY_USE_FEM
|
||||
phy_fem_disable();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Gets the current access address */
|
||||
|
||||
@@ -139,6 +139,21 @@ phy_fem_enable_lna(void)
|
||||
nrf_ppi_channels_enable(NRF_PPI, PPI_CHEN_CH6_Msk | PPI_CHEN_CH7_Msk);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
phy_fem_disable(void)
|
||||
{
|
||||
#if PHY_USE_FEM_SINGLE_GPIO
|
||||
NRF_GPIOTE->TASKS_CLR[PHY_GPIOTE_FEM] = 1;
|
||||
#else
|
||||
#if PHY_USE_FEM_PA
|
||||
NRF_GPIOTE->TASKS_CLR[PHY_GPIOTE_FEM_PA] = 1;
|
||||
#endif
|
||||
#if PHY_USE_FEM_LNA
|
||||
NRF_GPIOTE->TASKS_CLR[PHY_GPIOTE_FEM_LNA] = 1;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif /* PHY_USE_FEM */
|
||||
|
||||
void
|
||||
|
||||
@@ -68,6 +68,7 @@ void phy_fem_enable_pa(void);
|
||||
#if PHY_USE_FEM_LNA
|
||||
void phy_fem_enable_lna(void);
|
||||
#endif
|
||||
void phy_fem_disable(void);
|
||||
#endif
|
||||
|
||||
void phy_ppi_init(void);
|
||||
|
||||
Reference in New Issue
Block a user