From ddf39793f3db850e9e0bd925cbd47a339ce7f5a9 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sun, 5 Mar 2023 12:53:11 +0100 Subject: [PATCH] rp2/pendsv: Add MICROPY_BOARD_PENDSV_ENTRIES for board customisation. --- ports/rp2/mpconfigport.h | 5 +++++ ports/rp2/pendsv.c | 1 + ports/rp2/pendsv.h | 1 + 3 files changed, 7 insertions(+) diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index f5391b5a78..c987a0dc24 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -201,6 +201,11 @@ extern const struct _mp_obj_type_t mod_network_nic_type_wiznet5k; MICROPY_HW_NIC_WIZNET5K \ MICROPY_BOARD_NETWORK_INTERFACES \ +// Additional entries for use with pendsv_schedule_dispatch. +#ifndef MICROPY_BOARD_PENDSV_ENTRIES +#define MICROPY_BOARD_PENDSV_ENTRIES +#endif + #define MP_STATE_PORT MP_STATE_VM // Miscellaneous settings diff --git a/ports/rp2/pendsv.c b/ports/rp2/pendsv.c index 91b133c069..e4f662715f 100644 --- a/ports/rp2/pendsv.c +++ b/ports/rp2/pendsv.c @@ -25,6 +25,7 @@ */ #include +#include "py/mpconfig.h" #include "pendsv.h" #include "RP2040.h" diff --git a/ports/rp2/pendsv.h b/ports/rp2/pendsv.h index 1da3d22e53..294cef3c70 100644 --- a/ports/rp2/pendsv.h +++ b/ports/rp2/pendsv.h @@ -38,6 +38,7 @@ enum { #if MICROPY_PY_NETWORK_WIZNET5K PENDSV_DISPATCH_WIZNET, #endif + MICROPY_BOARD_PENDSV_ENTRIES PENDSV_DISPATCH_MAX };