diff options
Diffstat (limited to 'extmod/machine_spi.c')
-rw-r--r-- | extmod/machine_spi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extmod/machine_spi.c b/extmod/machine_spi.c index bb35cff38..8c4d91a3c 100644 --- a/extmod/machine_spi.c +++ b/extmod/machine_spi.c @@ -28,6 +28,9 @@ #include <string.h> #include "py/runtime.h" + +#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI + #include "extmod/machine_spi.h" // if a port didn't define MSB/LSB constants then provide them @@ -39,8 +42,6 @@ /******************************************************************************/ // MicroPython bindings for generic machine.SPI -#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI - STATIC mp_obj_t machine_spi_init(size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_obj_base_t *s = (mp_obj_base_t *)MP_OBJ_TO_PTR(args[0]); mp_machine_spi_p_t *spi_p = (mp_machine_spi_p_t *)MP_OBJ_TYPE_GET_SLOT(s->type, protocol); |