drivers: nrf_802154: Update the IEEE 802.15.4 component
This commit updates the nRF 802.15.4 radio driver to feature the latest changes. sdk-nrf-802154 commit: ee322183173c1d9a50203562a8021d13bed5ee04 Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
This commit is contained in:
parent
609d4b41fe
commit
6c6b666ab3
|
@ -254,9 +254,20 @@ bool nrf_802154_critical_section_is_nested(void)
|
|||
|
||||
uint32_t nrf_802154_critical_section_active_vector_priority_get(void)
|
||||
{
|
||||
uint32_t active_priority;
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_BSIM_NRFXX)
|
||||
/* The nRF52_bsim does not implement the SCB. Use its APIs to get the
|
||||
* currently running ISR instead */
|
||||
int irq_number = posix_get_current_irq();
|
||||
|
||||
if (irq_number == -1) /* not in interrupt */
|
||||
{
|
||||
return UINT32_MAX;
|
||||
}
|
||||
#else
|
||||
uint32_t active_vector_id = (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) >> SCB_ICSR_VECTACTIVE_Pos;
|
||||
IRQn_Type irq_number;
|
||||
uint32_t active_priority;
|
||||
|
||||
// Check if this function is called from main thread.
|
||||
if (active_vector_id == 0)
|
||||
|
@ -267,7 +278,7 @@ uint32_t nrf_802154_critical_section_active_vector_priority_get(void)
|
|||
irq_number = (IRQn_Type)((int32_t)active_vector_id - CMSIS_IRQ_NUM_VECTACTIVE_DIFF);
|
||||
|
||||
assert(irq_number >= SVCall_IRQn);
|
||||
|
||||
#endif
|
||||
active_priority = NVIC_GetPriority(irq_number);
|
||||
|
||||
return active_priority;
|
||||
|
|
|
@ -553,6 +553,13 @@ static inline void wait_until_radio_is_disabled(void)
|
|||
radio_is_disabled = true;
|
||||
break;
|
||||
}
|
||||
#if defined(CONFIG_SOC_SERIES_BSIM_NRFXX)
|
||||
nrf_802154_delay_us(1);
|
||||
/* In this simulated board, and in general in the POSIX ARCH,
|
||||
* code takes 0 simulated time to execute.
|
||||
* Let's hold for 1 microsecond to allow the RADIO HW to clear the state
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
assert(radio_is_disabled);
|
||||
|
|
Loading…
Reference in New Issue