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 <maureen.helm@analog.com>
This commit is contained in:
Maureen Helm 2023-08-30 16:49:40 -05:00 committed by Damien George
parent a7ae3a385e
commit e191265f7f

View file

@ -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;