summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extmod/modmachine.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/extmod/modmachine.h b/extmod/modmachine.h
index d186ce661..e6b08b3fc 100644
--- a/extmod/modmachine.h
+++ b/extmod/modmachine.h
@@ -30,9 +30,9 @@
#include "py/mphal.h"
#include "py/obj.h"
-#if MICROPY_PY_MACHINE
-
+#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI
#include "drivers/bus/spi.h"
+#endif
// Whether to enable the ADC.init() method.
// Requires a port to implement mp_machine_adc_init_helper().
@@ -264,6 +264,4 @@ MP_DECLARE_CONST_FUN_OBJ_2(mp_machine_spi_write_obj);
MP_DECLARE_CONST_FUN_OBJ_3(mp_machine_spi_write_readinto_obj);
#endif
-#endif // MICROPY_PY_MACHINE
-
#endif // MICROPY_INCLUDED_EXTMOD_MODMACHINE_H