Skip to content

Commit e8a369e

Browse files
MaureenHelmmbolivar-nordic
authored andcommitted
drivers: spi: Fix SPI_DT_SPEC initializer for XCC toolchain
XCC (which is based on GCC 4.2) needs the initializer of one of the union elements to be enclosed in brackets. Signed-off-by: Maureen Helm <[email protected]>
1 parent e7a010d commit e8a369e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/drivers/spi.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ struct spi_cs_control {
251251
*/
252252
#define SPI_CS_CONTROL_PTR_DT(node_id, delay_) \
253253
(&(struct spi_cs_control) { \
254-
.gpio = SPI_CS_GPIOS_DT_SPEC_GET(node_id), \
254+
{ \
255+
.gpio = SPI_CS_GPIOS_DT_SPEC_GET(node_id),\
256+
}, \
255257
.delay = (delay_), \
256258
})
257259

0 commit comments

Comments
 (0)