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>
pull/9335/head
Maureen Helm 2023-08-30 16:49:40 -05:00
rodzic 24ec66471b
commit 3a8d6f11a9
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

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