diff options
| author | Damien George <damien@micropython.org> | 2023-07-13 13:10:31 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-07-13 13:10:31 +1000 |
| commit | 62673a7708083ab3d9452d67117b424cd4b81150 (patch) | |
| tree | 8b011f1144d1d7e839fd668e3c664c9fe1fe4191 | |
| parent | 730525cec965a912354454ec015a3d043d5579d3 (diff) | |
stm32/mpconfigport: Always define MICROPY_SOFT_TIMER_TICKS_MS.
Even if MICROPY_PY_MACHINE is disabled, the soft timer is still used.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/stm32/mpconfigport.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index 3c44bddfd..c3202d1f2 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -123,7 +123,6 @@ #define MICROPY_PY_MACHINE_SPI_LSB (SPI_FIRSTBIT_LSB) #define MICROPY_PY_MACHINE_SOFTSPI (1) #define MICROPY_PY_MACHINE_TIMER (1) -#define MICROPY_SOFT_TIMER_TICKS_MS uwTick #endif #define MICROPY_HW_SOFTSPI_MIN_DELAY (0) #define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (HAL_RCC_GetSysClockFreq() / 48) @@ -275,6 +274,9 @@ static inline mp_uint_t disable_irq(void) { #define MICROPY_THREAD_YIELD() #endif +// Configuration for shared/runtime/softtimer.c. +#define MICROPY_SOFT_TIMER_TICKS_MS uwTick + // For regular code that wants to prevent "background tasks" from running. // These background tasks (LWIP, Bluetooth) run in PENDSV context. #define MICROPY_PY_PENDSV_ENTER uint32_t atomic_state = raise_irq_pri(IRQ_PRI_PENDSV); |
