File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ LOG_MODULE_REGISTER(sx1276);
23
23
#define GPIO_RESET_PIN DT_INST_GPIO_PIN(0, reset_gpios)
24
24
#define GPIO_RESET_FLAGS DT_INST_GPIO_FLAGS(0, reset_gpios)
25
25
#define GPIO_CS_PIN DT_INST_SPI_DEV_CS_GPIOS_PIN(0)
26
+ #define GPIO_CS_FLAGS DT_INST_SPI_DEV_CS_GPIOS_FLAGS(0)
26
27
27
28
#define GPIO_ANTENNA_ENABLE_PIN \
28
29
DT_INST_GPIO_PIN(0, antenna_enable_gpios)
@@ -541,7 +542,6 @@ static int sx1276_lora_init(struct device *dev)
541
542
dev_data .spi_cfg .slave = DT_INST_REG_ADDR (0 );
542
543
543
544
#if DT_INST_SPI_DEV_HAS_CS_GPIOS (0 )
544
- spi_cs .gpio_pin = GPIO_CS_PIN ,
545
545
spi_cs .gpio_dev = device_get_binding (
546
546
DT_INST_SPI_DEV_CS_GPIOS_LABEL (0 ));
547
547
if (!spi_cs .gpio_dev ) {
@@ -550,6 +550,10 @@ static int sx1276_lora_init(struct device *dev)
550
550
return - EIO ;
551
551
}
552
552
553
+ spi_cs .gpio_pin = GPIO_CS_PIN ;
554
+ spi_cs .gpio_dt_flags = GPIO_CS_FLAGS ;
555
+ spi_cs .delay = 0U ;
556
+
553
557
dev_data .spi_cfg .cs = & spi_cs ;
554
558
#endif
555
559
You can’t perform that action at this time.
0 commit comments