diff --git a/drivers/lora_lbm/lr11xx/lr11xx_hal.c b/drivers/lora_lbm/lr11xx/lr11xx_hal.c index 760ec5d..dd00bae 100644 --- a/drivers/lora_lbm/lr11xx/lr11xx_hal.c +++ b/drivers/lora_lbm/lr11xx/lr11xx_hal.c @@ -104,7 +104,7 @@ lr11xx_hal_status_t lr11xx_hal_write(const void *context, } }; - const struct spi_buf_set tx = {.buffers = tx_buf, .count = ARRAY_SIZE(tx_buf)}; + const struct spi_buf_set tx = {.buffers = tx_buf, .count = (data_length ? ARRAY_SIZE(tx_buf) : ((ARRAY_SIZE(tx_buf))-1))}; ret = spi_write_dt(&config->spi, &tx); if (ret) {