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>
This commit is contained in:
Damien George 2023-07-13 13:10:31 +10:00
parent 730525cec9
commit 62673a7708
1 changed files with 3 additions and 1 deletions

View File

@ -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);