diff --git a/ports/psoc6/modules/machine/machine_i2s.c b/ports/psoc6/modules/machine/machine_i2s.c index 90504d051f47c..58c3d3e6c24e1 100644 --- a/ports/psoc6/modules/machine/machine_i2s.c +++ b/ports/psoc6/modules/machine/machine_i2s.c @@ -16,13 +16,12 @@ #include "cyhal.h" // port-specific includes -#include "drivers/machine/psoc6_gpio.h" +#include "extmod/modmachine.h" #include "modmachine.h" #include "mplogger.h" -#include "pins.h" #include -#if MICROPY_PY_MACHINE_I2S +#if MICROPY_PY_MACHINE_PSOC6_I2S #define MCLK_CODEC_DELAY_MS (10u) /* in ms */ #define MCLK_FREQ_HZ ((384U) * (AUDIO_IN_SAMPLE_FREQ))/* in Hz */ @@ -587,4 +586,4 @@ MP_DEFINE_CONST_OBJ_TYPE( MP_REGISTER_ROOT_POINTER(void *machine_i2s_obj[2]); -#endif // MICROPY_PY_MACHINE_I2S +#endif // MICROPY_PY_MACHINE_PSOC6_I2S diff --git a/ports/psoc6/mpconfigport.h b/ports/psoc6/mpconfigport.h index 60393cae2e38c..f277d1e8369d4 100644 --- a/ports/psoc6/mpconfigport.h +++ b/ports/psoc6/mpconfigport.h @@ -116,13 +116,15 @@ #define MICROPY_PY_MACHINE_PWM_INCLUDEFILE "ports/psoc6/modules/machine/machine_pwm.c" #define MICROPY_PY_MACHINE_I2C (1) #define MICROPY_PY_MACHINE_SOFTI2C (1) -#define MICROPY_PY_MACHINE_I2S (1) #define MICROPY_PY_MACHINE_SPI (1) #define MICROPY_PY_MACHINE_SPI_MSB (0) #define MICROPY_PY_MACHINE_SPI_LSB (1) #define MICROPY_PY_MACHINE_SOFTSPI (1) +#define MICROPY_PY_MACHINE_PSOC6_I2S (1) +#define MICROPY_PY_MACHINE_I2S_INCLUDEFILE "ports/psoc6/modules/machine/machine_i2s.c" + // VFS #define MICROPY_VFS (1) #define MICROPY_READER_VFS (1)