drivers/sx126x: fix NETOPT_RX_SYMBOL_TIMEOUT
This commit is contained in:
parent
986fe58704
commit
b299299ad3
@ -107,7 +107,7 @@ struct sx126x {
|
|||||||
sx126x_pkt_params_lora_t pkt_params; /**< Lora packet parameters */
|
sx126x_pkt_params_lora_t pkt_params; /**< Lora packet parameters */
|
||||||
sx126x_mod_params_lora_t mod_params; /**< Lora modulation parameters */
|
sx126x_mod_params_lora_t mod_params; /**< Lora modulation parameters */
|
||||||
uint32_t channel; /**< Current channel frequency (in Hz) */
|
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 */
|
bool radio_sleep; /**< Radio sleep status */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -425,9 +425,9 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len)
|
|||||||
return sizeof(netopt_enable_t);
|
return sizeof(netopt_enable_t);
|
||||||
|
|
||||||
case NETOPT_RX_SYMBOL_TIMEOUT:
|
case NETOPT_RX_SYMBOL_TIMEOUT:
|
||||||
assert(len <= sizeof(uint8_t));
|
assert(len <= sizeof(uint16_t));
|
||||||
dev->rx_timeout = *(const uint8_t *)val;
|
dev->rx_timeout = *(const uint16_t *)val;
|
||||||
return sizeof(uint8_t);
|
return sizeof(uint16_t);
|
||||||
|
|
||||||
case NETOPT_TX_POWER:
|
case NETOPT_TX_POWER:
|
||||||
assert(len <= sizeof(int16_t));
|
assert(len <= sizeof(int16_t));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user