Skip to content
Snippets Groups Projects
Unverified Commit 09335b07 authored by Marian Buschsieweke's avatar Marian Buschsieweke
Browse files

drivers/sx127x: Use NETOPT_MAX_DPU_SIZE

Updated sx127x to use NETOPT_MAX_DPU_SIZE instead of the deprecated
NETOPT_MAX_PACKET_SIZE
parent 1bd6ac4f
No related branches found
No related tags found
No related merge requests found
...@@ -333,7 +333,7 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len) ...@@ -333,7 +333,7 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len)
*((uint8_t*) val) = sx127x_get_coding_rate(dev); *((uint8_t*) val) = sx127x_get_coding_rate(dev);
return sizeof(uint8_t); return sizeof(uint8_t);
case NETOPT_MAX_PACKET_SIZE: case NETOPT_MAX_PDU_SIZE:
assert(max_len >= sizeof(uint8_t)); assert(max_len >= sizeof(uint8_t));
*((uint8_t*) val) = sx127x_get_max_payload_len(dev); *((uint8_t*) val) = sx127x_get_max_payload_len(dev);
return sizeof(uint8_t); return sizeof(uint8_t);
...@@ -437,7 +437,7 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len) ...@@ -437,7 +437,7 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len)
sx127x_set_coding_rate(dev, cr); sx127x_set_coding_rate(dev, cr);
return sizeof(uint8_t); return sizeof(uint8_t);
case NETOPT_MAX_PACKET_SIZE: case NETOPT_MAX_PDU_SIZE:
assert(len <= sizeof(uint8_t)); assert(len <= sizeof(uint8_t));
sx127x_set_max_payload_len(dev, *((const uint8_t*) val)); sx127x_set_max_payload_len(dev, *((const uint8_t*) val));
return sizeof(uint8_t); return sizeof(uint8_t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment