File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed
hal/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32 Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 25
25
#include "dma_api_HAL.h"
26
26
#include "em_device.h"
27
27
#include "em_cmu.h"
28
- #include "em_int.h"
29
28
30
29
#ifdef DMA_PRESENT
31
30
#include "em_dma.h"
@@ -198,7 +197,6 @@ bool LDMAx_ChannelEnabled( int ch )
198
197
EFM_ASSERT (ch < DMA_CHAN_COUNT );
199
198
uint32_t chMask = 1 << ch ;
200
199
return (bool )(LDMA -> CHEN & chMask );
201
- INT_Disable ();
202
200
}
203
201
204
202
#endif /* LDMA_PRESENT */
Original file line number Diff line number Diff line change 28
28
#include "rtc_api_HAL.h"
29
29
#include "lp_ticker_api.h"
30
30
31
- #include "em_int .h"
31
+ #include "critical .h"
32
32
#if (defined RTCC_COUNT ) && (RTCC_COUNT > 0 )
33
33
#include "em_rtcc.h"
34
34
#endif
@@ -38,21 +38,21 @@ static int rtc_reserved = 0;
38
38
void lp_ticker_init ()
39
39
{
40
40
if (!rtc_reserved ) {
41
- INT_Disable ();
41
+ core_util_critical_section_enter ();
42
42
rtc_init_real (RTC_INIT_LPTIMER );
43
43
rtc_set_comp0_handler ((uint32_t )lp_ticker_irq_handler );
44
44
rtc_reserved = 1 ;
45
- INT_Enable ();
45
+ core_util_critical_section_exit ();
46
46
}
47
47
}
48
48
49
49
void lp_ticker_free ()
50
50
{
51
51
if (rtc_reserved ) {
52
- INT_Disable ();
52
+ core_util_critical_section_enter ();
53
53
rtc_free_real (RTC_INIT_LPTIMER );
54
54
rtc_reserved = 0 ;
55
- INT_Enable ();
55
+ core_util_critical_section_exit ();
56
56
}
57
57
}
58
58
Original file line number Diff line number Diff line change 28
28
#include "sleepmodes.h"
29
29
#include "cmsis.h"
30
30
#include "em_emu.h"
31
- #include "em_int .h"
31
+ #include "critical .h"
32
32
33
33
uint32_t sleep_block_counter [NUM_SLEEP_MODES ] = {0 };
34
34
@@ -80,9 +80,9 @@ void deepsleep(void)
80
80
*/
81
81
void blockSleepMode (sleepstate_enum minimumMode )
82
82
{
83
- INT_Disable ();
83
+ core_util_critical_section_enter ();
84
84
sleep_block_counter [minimumMode ]++ ;
85
- INT_Enable ();
85
+ core_util_critical_section_exit ();
86
86
}
87
87
88
88
/** Unblock the microcontroller from sleeping below a certain mode
@@ -94,11 +94,11 @@ void blockSleepMode(sleepstate_enum minimumMode)
94
94
*/
95
95
void unblockSleepMode (sleepstate_enum minimumMode )
96
96
{
97
- INT_Disable ();
97
+ core_util_critical_section_enter ();
98
98
if (sleep_block_counter [minimumMode ] > 0 ) {
99
99
sleep_block_counter [minimumMode ]-- ;
100
100
}
101
- INT_Enable ();
101
+ core_util_critical_section_exit ();
102
102
}
103
103
104
104
#endif
You can’t perform that action at this time.
0 commit comments