File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 19
19
#include <stdint.h>
20
20
#include <stddef.h>
21
21
#include "cmsis.h"
22
- #include <assert.h>
22
+ #include "mbed_assert.h"
23
23
24
24
// Module include
25
25
#include "critical.h"
@@ -40,9 +40,9 @@ void core_util_critical_section_enter()
40
40
/* If the interrupt_enable_counter overflows or we are in a nested critical section and interrupts
41
41
are enabled, then something has gone badly wrong thus assert an error.
42
42
*/
43
- assert (interrupt_enable_counter < UINT32_MAX );
43
+ MBED_ASSERT (interrupt_enable_counter < UINT32_MAX );
44
44
if (interrupt_enable_counter > 0 ) {
45
- assert (primask & 0x1 );
45
+ MBED_ASSERT (primask & 0x1 );
46
46
}
47
47
interrupt_enable_counter ++ ;
48
48
}
@@ -54,7 +54,7 @@ void core_util_critical_section_exit()
54
54
55
55
uint32_t primask = __get_PRIMASK (); /* get the current interrupt enabled state */
56
56
57
- assert (primask & 0x1 ); /* Interrupts must be disabled on invoking an exit from a critical section */
57
+ MBED_ASSERT (primask & 0x1 ); /* Interrupts must be disabled on invoking an exit from a critical section */
58
58
59
59
interrupt_enable_counter -- ;
60
60
You can’t perform that action at this time.
0 commit comments