diff options
Diffstat (limited to 'py/mphal.h')
-rw-r--r-- | py/mphal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/py/mphal.h b/py/mphal.h index 0d4b1224e5..19fceef718 100644 --- a/py/mphal.h +++ b/py/mphal.h @@ -35,6 +35,14 @@ #include <mphalport.h> #endif +// On embedded platforms, these will typically enable/disable irqs. +#ifndef MICROPY_BEGIN_ATOMIC_SECTION +#define MICROPY_BEGIN_ATOMIC_SECTION() (0) +#endif +#ifndef MICROPY_END_ATOMIC_SECTION +#define MICROPY_END_ATOMIC_SECTION(state) (void)(state) +#endif + #ifndef mp_hal_stdio_poll uintptr_t mp_hal_stdio_poll(uintptr_t poll_flags); #endif |