1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/sx126x: fix NETOPT_RX_SYMBOL_TIMEOUT

This commit is contained in:
Jose Alamos 2021-07-14 12:02:16 +02:00
parent 986fe58704
commit b299299ad3
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9
2 changed files with 4 additions and 4 deletions

View File

@ -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 */
};

View File

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