From c846c69ab31e85934756d3df9d1e136dc6718f9f Mon Sep 17 00:00:00 2001 From: Artem Date: Sat, 29 Aug 2020 23:44:57 +0200 Subject: [PATCH] py: define ATOMIC macros --- ports/gprs_a9/mpconfigport.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/gprs_a9/mpconfigport.h b/ports/gprs_a9/mpconfigport.h index 2a6f85033a89..d3d0cbb24b32 100644 --- a/ports/gprs_a9/mpconfigport.h +++ b/ports/gprs_a9/mpconfigport.h @@ -8,6 +8,8 @@ #include #include +#include "api_sys.h" + // options to control how MicroPython is built @@ -63,6 +65,8 @@ #define MICROPY_ENABLE_SCHEDULER (1) #define MICROPY_SCHEDULER_DEPTH (8) #define MICROPY_COMP_CONST (1) +#define MICROPY_BEGIN_ATOMIC_SECTION() SYS_EnterCriticalSection() +#define MICROPY_END_ATOMIC_SECTION(state) SYS_ExitCriticalSection(state) // MCU definition #define MP_ENDIANNESS_LITTLE (1)