From 9855df3326a7aa69606fe8e0edcb5c731f36ca40 Mon Sep 17 00:00:00 2001 From: enriquezgarc Date: Mon, 11 Mar 2024 15:11:18 +0100 Subject: [PATCH] ports/psoc6: WIP demo changes, 20 bits accept. Signed-off-by: enriquezgarc --- ports/psoc6/machine_i2s.c | 4 ++-- ports/psoc6/main.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/psoc6/machine_i2s.c b/ports/psoc6/machine_i2s.c index 77e07d426891..9d38d98494a7 100644 --- a/ports/psoc6/machine_i2s.c +++ b/ports/psoc6/machine_i2s.c @@ -122,8 +122,8 @@ static void machine_i2s_init_helper(machine_i2s_obj_t *self, size_t n_pos_args, // is Bits valid? int8_t i2s_bits = args[ARG_bits].u_int; if ((i2s_bits != 16) && - (i2s_bits != 32) - ) { + (i2s_bits != 32) && + (i2s_bits) != 20) { mp_raise_ValueError(MP_ERROR_TEXT("invalid bits")); } diff --git a/ports/psoc6/main.c b/ports/psoc6/main.c index 0d7b2cdd1928..c3111a4b59c1 100644 --- a/ports/psoc6/main.c +++ b/ports/psoc6/main.c @@ -74,6 +74,7 @@ int main(int argc, char **argv) { // Initialize retarget-io to use the debug UART port // FOR DEMO PURPOSES WE USE OTHER THAN THE BSP UART PINS + // result = cy_retarget_io_init(CYBSP_DEBUG_UART_TX, CYBSP_DEBUG_UART_RX, CY_RETARGET_IO_BAUDRATE); result = cy_retarget_io_init(P10_1, P10_0, CY_RETARGET_IO_BAUDRATE); if (result != CY_RSLT_SUCCESS) { mp_raise_ValueError(MP_ERROR_TEXT("cy_retarget_io_init failed !\n"));