From b299299ad3f10e45f202d8520fd19d8eab3c9ddc Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Wed, 14 Jul 2021 12:02:16 +0200 Subject: [PATCH] drivers/sx126x: fix NETOPT_RX_SYMBOL_TIMEOUT --- drivers/include/sx126x.h | 2 +- drivers/sx126x/sx126x_netdev.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/include/sx126x.h b/drivers/include/sx126x.h index 78d0eba604..127c0f10bb 100644 --- a/drivers/include/sx126x.h +++ b/drivers/include/sx126x.h @@ -107,7 +107,7 @@ struct sx126x { sx126x_pkt_params_lora_t pkt_params; /**< Lora packet parameters */ sx126x_mod_params_lora_t mod_params; /**< Lora modulation parameters */ uint32_t channel; /**< Current channel frequency (in Hz) */ - uint8_t rx_timeout; /**< Rx Timeout in terms of symbols */ + uint16_t rx_timeout; /**< Rx Timeout in terms of symbols */ bool radio_sleep; /**< Radio sleep status */ }; diff --git a/drivers/sx126x/sx126x_netdev.c b/drivers/sx126x/sx126x_netdev.c index bf0ca8e764..3fee95d5da 100644 --- a/drivers/sx126x/sx126x_netdev.c +++ b/drivers/sx126x/sx126x_netdev.c @@ -425,9 +425,9 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len) return sizeof(netopt_enable_t); case NETOPT_RX_SYMBOL_TIMEOUT: - assert(len <= sizeof(uint8_t)); - dev->rx_timeout = *(const uint8_t *)val; - return sizeof(uint8_t); + assert(len <= sizeof(uint16_t)); + dev->rx_timeout = *(const uint16_t *)val; + return sizeof(uint16_t); case NETOPT_TX_POWER: assert(len <= sizeof(int16_t));