From fb94ae48e91a0893e78dc33496bb0da18573bb4f Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sun, 5 Mar 2023 12:54:48 +0100 Subject: [PATCH] samd/pendsv: Add MICROPY_BOARD_PENDSV_ENTRIES for board customisation. --- ports/samd/mpconfigport.h | 5 +++++ ports/samd/pendsv.h | 1 + 2 files changed, 6 insertions(+) diff --git a/ports/samd/mpconfigport.h b/ports/samd/mpconfigport.h index 8e51720fd5..613c24c970 100644 --- a/ports/samd/mpconfigport.h +++ b/ports/samd/mpconfigport.h @@ -110,6 +110,11 @@ #define MP_STATE_PORT MP_STATE_VM +// Additional entries for use with pendsv_schedule_dispatch. +#ifndef MICROPY_BOARD_PENDSV_ENTRIES +#define MICROPY_BOARD_PENDSV_ENTRIES +#endif + // Miscellaneous settings __attribute__((always_inline)) static inline void enable_irq(uint32_t state) { __set_PRIMASK(state); diff --git a/ports/samd/pendsv.h b/ports/samd/pendsv.h index c21af906b4..6671fa4e28 100644 --- a/ports/samd/pendsv.h +++ b/ports/samd/pendsv.h @@ -28,6 +28,7 @@ enum { PENDSV_DISPATCH_SOFT_TIMER, // For later & for having at least one entry + MICROPY_BOARD_PENDSV_ENTRIES PENDSV_DISPATCH_MAX };