From e191265f7f71862ccc5634797c60f443511752f1 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Wed, 30 Aug 2023 16:49:40 -0500 Subject: [PATCH] zephyr: Change SPI chip select from a pointer to a struct member. Zephyr v3.4.0 changed the SPI chip select from a pointer to a struct member to allow using the existing SPI dt-spec macros in C++. Signed-off-by: Maureen Helm --- ports/zephyr/machine_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/zephyr/machine_spi.c b/ports/zephyr/machine_spi.c index 2474f2bb87..80bfa2e548 100644 --- a/ports/zephyr/machine_spi.c +++ b/ports/zephyr/machine_spi.c @@ -102,7 +102,7 @@ mp_obj_t machine_hard_spi_make_new(const mp_obj_type_t *type, size_t n_args, siz args[ARG_bits].u_int << 5 | SPI_LINES_SINGLE), .slave = 0, - .cs = NULL + .cs = {}, }; machine_hard_spi_obj_t *self = mp_obj_malloc(machine_hard_spi_obj_t, &machine_spi_type); @@ -157,7 +157,7 @@ static void machine_hard_spi_init(mp_obj_base_t *obj, size_t n_args, const mp_ob .frequency = baudrate, .operation = operation, .slave = 0, - .cs = NULL + .cs = {}, }; self->config = cfg;