Merge pull request #7015 from haukepetersen/opt_nrfmin_pktsize

driver/nrfmin: add get MAX_PACKET_SIZE option
This commit is contained in:
Martine Lenders 2017-05-05 19:47:50 +02:00 committed by GitHub
commit 4ccf0b7841

View File

@ -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);