1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

sx127x: implement NETOPT_PDU_SIZE

This commit is contained in:
Jose Alamos 2020-07-14 12:11:23 +02:00
parent f3bdf7232d
commit 84eb2dc30c

View File

@ -455,6 +455,11 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len)
sx127x_set_fixed_header_len_mode(dev, *((const netopt_enable_t*) val) ? true : false);
return sizeof(netopt_enable_t);
case NETOPT_PDU_SIZE:
assert(len <= sizeof(uint16_t));
sx127x_set_payload_length(dev, *((const uint16_t*) val));
return sizeof(uint16_t);
case NETOPT_PREAMBLE_LENGTH:
assert(len <= sizeof(uint16_t));
sx127x_set_preamble_length(dev, *((const uint16_t*) val));