Skip to content

Commit

Permalink
ports/psoc6/machine_i2s.c: Port specific i2s pre-integration extmod/i2s.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Nov 7, 2023
1 parent 72e91ac commit 63eb96d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ports/psoc6/modules/machine/machine_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <FreeRTOS.h>

#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 */
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion ports/psoc6/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63eb96d

Please sign in to comment.