Browse Source

driver/nrfmin: add get MAX_PACKET_SIZE option

master
Hauke Petersen 6 years ago
parent
commit
a7e54e10c0
  1. 3
      cpu/nrf5x_common/radio/nrfmin/nrfmin.c

3
cpu/nrf5x_common/radio/nrfmin/nrfmin.c

@ -477,6 +477,9 @@ static int nrfmin_get(netdev_t *dev, netopt_t opt, void *val, size_t max_len)
assert(max_len >= sizeof(int16_t));
*((int16_t *)val) = nrfmin_get_txpower();
return sizeof(int16_t);
case NETOPT_MAX_PACKET_SIZE:
assert(max_len >= sizeof(uint16_t));
*((uint16_t *)val) = NRFMIN_PAYLOAD_MAX;
case NETOPT_ADDRESS_LONG:
assert(max_len >= sizeof(uint64_t));
nrfmin_get_pseudo_long_addr((uint16_t *)val);

Loading…
Cancel
Save