summaryrefslogtreecommitdiff
path: root/extmod/modmachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/modmachine.h')
-rw-r--r--extmod/modmachine.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/extmod/modmachine.h b/extmod/modmachine.h
index 0744ef788..488aef4af 100644
--- a/extmod/modmachine.h
+++ b/extmod/modmachine.h
@@ -114,7 +114,7 @@
} \
} while (0)
-#if MICROPY_PY_MACHINE_I2C
+#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
#define MP_MACHINE_I2C_FLAG_READ (0x01) // if not set then it's a write
#define MP_MACHINE_I2C_FLAG_STOP (0x02)
@@ -139,7 +139,7 @@ typedef struct _machine_mem_obj_t {
unsigned elem_size; // in bytes
} machine_mem_obj_t;
-#if MICROPY_PY_MACHINE_I2C
+#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
typedef struct _mp_machine_i2c_buf_t {
size_t len;
@@ -175,7 +175,7 @@ typedef struct _mp_machine_soft_i2c_obj_t {
#endif
-#if MICROPY_PY_MACHINE_SPI
+#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI
// SPI protocol.
typedef struct _mp_machine_spi_p_t {
@@ -215,16 +215,20 @@ extern const mp_obj_type_t machine_timer_type;
extern const mp_obj_type_t machine_uart_type;
extern const mp_obj_type_t machine_wdt_type;
-#if MICROPY_PY_MACHINE_I2C
+#if MICROPY_PY_MACHINE_SOFTI2C
extern const mp_obj_type_t mp_machine_soft_i2c_type;
+#endif
+#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
extern const mp_obj_dict_t mp_machine_i2c_locals_dict;
#endif
-#if MICROPY_PY_MACHINE_SPI
+#if MICROPY_PY_MACHINE_SOFTSPI
extern const mp_obj_type_t mp_machine_soft_spi_type;
-extern const mp_obj_dict_t mp_machine_spi_locals_dict;
extern const mp_machine_spi_p_t mp_machine_soft_spi_p;
#endif
+#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI
+extern const mp_obj_dict_t mp_machine_spi_locals_dict;
+#endif
#if defined(MICROPY_MACHINE_MEM_GET_READ_ADDR)
uintptr_t MICROPY_MACHINE_MEM_GET_READ_ADDR(mp_obj_t addr_o, uint align);