esp8266/mpconfigport.h: Add definitions for BEGIN/END_ATOMIC_SECTION.
These are needed to ensure correct operation of the MicroPython scheduler.
This commit is contained in:
parent
0bd58a5613
commit
419d1aa617
@ -114,6 +114,10 @@
|
||||
#define MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_POLL
|
||||
#define MICROPY_VM_HOOK_RETURN MICROPY_VM_HOOK_POLL
|
||||
|
||||
#include "xtirq.h"
|
||||
#define MICROPY_BEGIN_ATOMIC_SECTION() disable_irq()
|
||||
#define MICROPY_END_ATOMIC_SECTION(state) enable_irq(state)
|
||||
|
||||
// type definitions for the specific machine
|
||||
|
||||
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user