diff --git a/drivers/sx127x/sx127x_netdev.c b/drivers/sx127x/sx127x_netdev.c index ee021e956f..740299df6c 100644 --- a/drivers/sx127x/sx127x_netdev.c +++ b/drivers/sx127x/sx127x_netdev.c @@ -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)); diff --git a/sys/include/net/netopt.h b/sys/include/net/netopt.h index 779aeb4a49..563e3e8be4 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -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 */ /** diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index e7c9a26a37..ab26c1e7e2 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -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", };