diff options
| author | Phil Howard <phil@gadgetoid.com> | 2024-08-13 14:55:26 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-08-20 12:14:52 +1000 |
| commit | 26d91b897ea46a28f3d32cbe094b607124c1657d (patch) | |
| tree | e3088a9f4e195b1ec87cf79e5c8670d6aa1c06a1 | |
| parent | 76dd4facb9b1cf81e7f7a262c931adffb126b382 (diff) | |
rp2/mphalport: Skip core1_entry if thread disabled.
If `MICROPY_PY_THREAD` is set to 0 (ie: a user C module wishes to use core1
exclusively) then the test of `core1_entry` would fail to compile with an
"undeclared identifier" error. Fix it by wrapping in `MICROPY_PY_THREAD`.
Signed-off-by: Phil Howard <phil@gadgetoid.com>
| -rw-r--r-- | ports/rp2/mphalport.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/rp2/mphalport.c b/ports/rp2/mphalport.c index ad51cf8e2..aa5415d6c 100644 --- a/ports/rp2/mphalport.c +++ b/ports/rp2/mphalport.c @@ -232,9 +232,11 @@ static void soft_timer_hardware_callback(unsigned int alarm_num) { // This ISR only runs on core0, but if core1 is running Python code then it // may be blocked in WFE so wake it up as well. Unfortunately this also sets // the event flag on core0, so a subsequent WFE on this core will not suspend + #if MICROPY_PY_THREAD if (core1_entry != NULL) { __sev(); } + #endif } void soft_timer_init(void) { |
