mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/sx127x: add NETOPT_RX_SYMBOL_TIMEOUT setter
This commit is contained in:
parent
268e6df950
commit
ca8c78116f
@ -460,6 +460,11 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len)
|
||||
sx127x_set_rx_single(dev, *((const netopt_enable_t*) val) ? true : false);
|
||||
return sizeof(netopt_enable_t);
|
||||
|
||||
case NETOPT_RX_SYMBOL_TIMEOUT:
|
||||
assert(len <= sizeof(uint16_t));
|
||||
sx127x_set_symbol_timeout(dev, *((const uint16_t*) val));
|
||||
return sizeof(uint16_t);
|
||||
|
||||
case NETOPT_RX_TIMEOUT:
|
||||
assert(len <= sizeof(uint32_t));
|
||||
sx127x_set_rx_timeout(dev, *((const uint32_t*) val));
|
||||
|
@ -657,6 +657,11 @@ typedef enum {
|
||||
*/
|
||||
NETOPT_RANDOM,
|
||||
|
||||
/**
|
||||
* @brief (uint8_t) Get or set the number of PHY symbols before assuming there's no data
|
||||
*/
|
||||
NETOPT_RX_SYMBOL_TIMEOUT,
|
||||
|
||||
/* add more options if needed */
|
||||
|
||||
/**
|
||||
|
@ -108,6 +108,7 @@ static const char *_netopt_strmap[] = {
|
||||
[NETOPT_LORAWAN_MIN_RX_SYMBOL] = "NETOPT_LORAWAN_MIN_RX_SYMBOL",
|
||||
[NETOPT_SYNCWORD] = "NETOPT_SYNCWORD",
|
||||
[NETOPT_RANDOM] = "NETOPT_RANDOM",
|
||||
[NETOPT_RX_SYMBOL_TIMEOUT] = "NETOPT_RX_SYMBOL_TIMEOUT",
|
||||
[NETOPT_NUMOF] = "NETOPT_NUMOF",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user