@@ -74,7 +74,7 @@ void radio_high_prio_isr(void)
7474
7575void radio_low_prio_isr (void )
7676{
77- irq_disable (( IRQn_Type ) RADIO_SW_LOW_INTR_NUM );
77+ irq_disable (RADIO_SW_LOW_INTR_NUM );
7878
7979 low_isr_callback ();
8080
@@ -85,7 +85,7 @@ void radio_low_prio_isr(void)
8585 }
8686
8787 /* Re-enable SW radio low interrupt */
88- irq_enable (( IRQn_Type ) RADIO_SW_LOW_INTR_NUM );
88+ irq_enable (RADIO_SW_LOW_INTR_NUM );
8989
9090 ISR_DIRECT_PM ();
9191}
@@ -96,22 +96,22 @@ void link_layer_register_isr(void)
9696 ARM_IRQ_DIRECT_DYNAMIC_CONNECT (RADIO_INTR_NUM , 0 , 0 , reschedule );
9797
9898 /* Ensure the IRQ is disabled before enabling it at run time */
99- irq_disable (( IRQn_Type ) RADIO_INTR_NUM );
99+ irq_disable (RADIO_INTR_NUM );
100100
101- irq_connect_dynamic (( IRQn_Type ) RADIO_INTR_NUM , RADIO_INTR_PRIO_HIGH_Z ,
101+ irq_connect_dynamic (RADIO_INTR_NUM , RADIO_INTR_PRIO_HIGH_Z ,
102102 (void (* )(const void * ))radio_high_prio_isr , NULL , 0 );
103103
104- irq_enable (( IRQn_Type ) RADIO_INTR_NUM );
104+ irq_enable (RADIO_INTR_NUM );
105105
106106 ARM_IRQ_DIRECT_DYNAMIC_CONNECT (RADIO_SW_LOW_INTR_NUM , 0 , 0 , reschedule );
107107
108108 /* Ensure the IRQ is disabled before enabling it at run time */
109- irq_disable (( IRQn_Type ) RADIO_SW_LOW_INTR_NUM );
109+ irq_disable (RADIO_SW_LOW_INTR_NUM );
110110
111- irq_connect_dynamic (( IRQn_Type ) RADIO_SW_LOW_INTR_NUM , RADIO_SW_LOW_INTR_PRIO ,
111+ irq_connect_dynamic (RADIO_SW_LOW_INTR_NUM , RADIO_SW_LOW_INTR_PRIO ,
112112 (void (* )(const void * ))radio_low_prio_isr , NULL , 0 );
113113
114- irq_enable (( IRQn_Type ) RADIO_SW_LOW_INTR_NUM );
114+ irq_enable (RADIO_SW_LOW_INTR_NUM );
115115}
116116
117117
@@ -124,19 +124,15 @@ void LINKLAYER_PLAT_TriggerSwLowIT(uint8_t priority)
124124 /* Check if a SW low interrupt as already been raised.
125125 * Nested call far radio low isr are not supported
126126 **/
127-
128- if (NVIC_GetActive (RADIO_SW_LOW_INTR_NUM ) == 0 ) {
127+ if (NVIC_GetActive ((IRQn_Type )RADIO_SW_LOW_INTR_NUM ) == 0 ) {
129128 /* No nested SW low ISR, default behavior */
130-
131129 if (priority == 0 ) {
132130 low_isr_priority = RADIO_SW_LOW_INTR_PRIO ;
133131 }
134-
135132 NVIC_SetPriority ((IRQn_Type )RADIO_SW_LOW_INTR_NUM , low_isr_priority );
136133 } else {
137134 /* Nested call detected */
138135 /* No change for SW radio low interrupt priority for the moment */
139-
140136 if (priority != 0 ) {
141137 /* At the end of current SW radio low ISR, this pending SW
142138 * low interrupt will run with RADIO_INTR_PRIO_LOW_Z priority
@@ -208,11 +204,23 @@ void LINKLAYER_PLAT_DisableSpecificIRQ(uint8_t isr_type)
208204 }
209205}
210206
207+ void LINKLAYER_PLAT_EnableRadioIT (void )
208+ {
209+ LOG_DBG ("Enable RADIO IRQ" );
210+ irq_enable (RADIO_INTR_NUM );
211+ }
212+
213+ void LINKLAYER_PLAT_DisableRadioIT (void )
214+ {
215+ LOG_DBG ("Disable RADIO IRQ" );
216+ irq_disable (RADIO_INTR_NUM );
217+ }
218+
211219void LINKLAYER_PLAT_StartRadioEvt (void )
212220{
213221 __HAL_RCC_RADIO_CLK_SLEEP_ENABLE ();
214222
215- NVIC_SetPriority (RADIO_INTR_NUM , RADIO_INTR_PRIO_HIGH_Z );
223+ NVIC_SetPriority (( IRQn_Type ) RADIO_INTR_NUM , RADIO_INTR_PRIO_HIGH_Z );
216224
217225 scm_notifyradiostate (SCM_RADIO_ACTIVE );
218226}
@@ -221,7 +229,7 @@ void LINKLAYER_PLAT_StopRadioEvt(void)
221229{
222230 __HAL_RCC_RADIO_CLK_SLEEP_DISABLE ();
223231
224- NVIC_SetPriority (RADIO_INTR_NUM , RADIO_INTR_PRIO_LOW_Z );
232+ NVIC_SetPriority (( IRQn_Type ) RADIO_INTR_NUM , RADIO_INTR_PRIO_LOW_Z );
225233
226234 scm_notifyradiostate (SCM_RADIO_NOT_ACTIVE );
227235}
0 commit comments