Browse Source

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>
pull/11557/head
Damien George 1 year ago
parent
commit
62673a7708
  1. 4
      ports/stm32/mpconfigport.h

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

Loading…
Cancel
Save