diff options
| author | Damien George <damien@micropython.org> | 2024-02-07 13:13:03 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-02-07 13:45:51 +1100 |
| commit | 4e6436d4cffc7198f6d79431bb76eaf71d3e2ec1 (patch) | |
| tree | 38cb710d7d1abe323dc68901ff28d6ac9f2ec84d /ports/stm32/spi.c | |
| parent | 2158da213e49f40e74780ca9d5a07ce146d39281 (diff) | |
stm32/spi: Allow disabling MICROPY_PY_MACHINE_SPI.
This requires that MICROPY_PY_PYB is also disabled.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/spi.c')
| -rw-r--r-- | ports/stm32/spi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/spi.c b/ports/stm32/spi.c index ee2301c80..df71efd3f 100644 --- a/ports/stm32/spi.c +++ b/ports/stm32/spi.c @@ -735,6 +735,8 @@ void spi_print(const mp_print_t *print, const spi_t *spi_obj, bool legacy) { mp_print_str(print, ")"); } +#if MICROPY_PY_MACHINE_SPI + const spi_t *spi_from_mp_obj(mp_obj_t o) { if (mp_obj_is_type(o, &pyb_spi_type)) { pyb_spi_obj_t *self = MP_OBJ_TO_PTR(o); @@ -761,6 +763,8 @@ mp_obj_base_t *mp_hal_get_spi_obj(mp_obj_t o) { } } +#endif + /******************************************************************************/ // Implementation of low-level SPI C protocol |
