8000 esp8266/mpconfigport.h: Add definitions for BEGIN/END_ATOMIC_SECTION. · micropython/micropython@7de495e · GitHub
[go: up one dir, main page]

Skip to content

Commit 7de495e

Browse files
committed
esp8266/mpconfigport.h: Add definitions for BEGIN/END_ATOMIC_SECTION.
1 parent 7dac78e commit 7de495e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ports/esp8266/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@
114114
#define MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_POLL
115115
#define MICROPY_VM_HOOK_RETURN MICROPY_VM_HOOK_POLL
116116

117+
#include "xtirq.h"
118+
#define MICROPY_BEGIN_ATOMIC_SECTION() disable_irq()
119+
#define MICROPY_END_ATOMIC_SECTION(state) enable_irq(state)
120+
117121
// type definitions for the specific machine
118122

119123
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p)))

0 commit comments

Comments
 (0)
0