Commit 26d91b89 authored by Phil Howard's avatar Phil Howard Committed by Damien George

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: default avatarPhil Howard <phil@gadgetoid.com>
parent 76dd4fac
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment