File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
components/802.15.4_RF/mcr20a-rf-driver/source Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 44
44
45
45
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION ) && DEVICE_SPI
46
46
47
- #include "platform/arm_hal_interrupt .h"
47
+ #include "platform/mbed_critical .h"
48
48
49
49
/*****************************************************************************
50
50
* PRIVATE VARIABLES *
@@ -524,7 +524,7 @@ void MCR20Drv_IRQ_Disable
524
524
void
525
525
)
526
526
{
527
- platform_enter_critical ();
527
+ core_util_critical_section_enter ();
528
528
529
529
if ( mPhyIrqDisableCnt == 0 )
530
530
{
533
533
534
534
mPhyIrqDisableCnt ++ ;
535
535
536
- platform_exit_critical ();
536
+ core_util_critical_section_exit ();
537
537
}
538
538
539
539
/*---------------------------------------------------------------------------
@@ -547,7 +547,7 @@ void MCR20Drv_IRQ_Enable
547
547
void
548
548
)
549
549
{
550
- platform_enter_critical ();
550
+ core_util_critical_section_enter ();
551
551
552
552
if ( mPhyIrqDisableCnt )
553
553
{
559
559
}
560
560
}
561
561
562
- platform_exit_critical ();
562
+ core_util_critical_section_exit ();
563
563
}
564
564
565
565
/*---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -1093,7 +1093,6 @@ static void rf_init_phy_mode(void)
1093
1093
*/
1094
1094
static void PHY_InterruptHandler (void )
1095
1095
{
1096
- /* Disable and clear transceiver(IRQ_B) interrupt */
1097
1096
MCR20Drv_IRQ_Disable ();
1098
1097
irq_thread->signal_set (1 );
1099
1098
}
@@ -1106,15 +1105,14 @@ static void PHY_InterruptThread(void)
1106
1105
continue ;
1107
1106
}
1108
1107
handle_interrupt ();
1108
+ MCR20Drv_IRQ_Enable ();
1109
1109
}
1110
1110
}
1111
1111
1112
1112
static void handle_interrupt (void )
1113
1113
{
1114
1114
uint8_t xcvseqCopy;
1115
1115
1116
- // MCR20Drv_IRQ_Clear();
1117
-
1118
1116
/* Read transceiver interrupt status and control registers */
1119
1117
mStatusAndControlRegs [IRQSTS1] =
1120
1118
MCR20Drv_DirectAccessSPIMultiByteRead (IRQSTS2, &mStatusAndControlRegs [IRQSTS2], 7 );
@@ -1158,7 +1156,6 @@ static void handle_interrupt(void)
1158
1156
MCR20Drv_DirectAccessSPIMultiByteWrite (IRQSTS1, mStatusAndControlRegs , 5 );
1159
1157
1160
1158
rf_ack_wait_timer_interrupt ();
1161
- MCR20Drv_IRQ_Enable ();
1162
1159
return ;
1163
1160
}
1164
1161
}
@@ -1182,7 +1179,6 @@ static void handle_interrupt(void)
1182
1179
{
1183
1180
rf_receive ();
1184
1181
}
1185
- MCR20Drv_IRQ_Enable ();
1186
1182
return ;
1187
1183
}
1188
1184
@@ -1205,12 +1201,10 @@ static void handle_interrupt(void)
1205
1201
break ;
1206
1202
}
1207
1203
1208
- MCR20Drv_IRQ_Enable ();
1209
1204
return ;
1210
1205
}
1211
1206
/* Other IRQ. Clear XCVR interrupt flags */
1212
1207
MCR20Drv_DirectAccessSPIMultiByteWrite (IRQSTS1, mStatusAndControlRegs , 3 );
1213
- MCR20Drv_IRQ_Enable ();
1214
1208
}
1215
1209
1216
1210
/*
You can’t perform that action at this time.
0 commit comments