Merge pull request #10781 from miri64/nrfmin/cleanup/long-addr
nrfmin: remove long address support
This commit is contained in:
commit
1c712c79a4
@ -162,16 +162,6 @@ uint16_t nrfmin_get_addr(void);
|
|||||||
*/
|
*/
|
||||||
void nrfmin_set_addr(uint16_t addr);
|
void nrfmin_set_addr(uint16_t addr);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get a pseudo 64-bit long address (needed by IPv6 and 6LoWPAN)
|
|
||||||
*
|
|
||||||
* As we do not support 64-bit addresses, we just make one up, for this we
|
|
||||||
* simply return 4 times concatenated the 16-bit address.
|
|
||||||
*
|
|
||||||
* @param[out] addr 64-bit pseudo long address, as array of 4 * 16-bit
|
|
||||||
*/
|
|
||||||
void nrfmin_get_pseudo_long_addr(uint16_t *addr);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the IID build from the 16-bit node address
|
* @brief Get the IID build from the 16-bit node address
|
||||||
*
|
*
|
||||||
|
|||||||
@ -188,13 +188,6 @@ uint16_t nrfmin_get_addr(void)
|
|||||||
return my_addr;
|
return my_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nrfmin_get_pseudo_long_addr(uint16_t *addr)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 4; i++) {
|
|
||||||
addr[i] = my_addr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void nrfmin_get_iid(uint16_t *iid)
|
void nrfmin_get_iid(uint16_t *iid)
|
||||||
{
|
{
|
||||||
iid[0] = 0;
|
iid[0] = 0;
|
||||||
@ -487,10 +480,6 @@ static int nrfmin_get(netdev_t *dev, netopt_t opt, void *val, size_t max_len)
|
|||||||
assert(max_len >= sizeof(uint16_t));
|
assert(max_len >= sizeof(uint16_t));
|
||||||
*((uint16_t *)val) = NRFMIN_PAYLOAD_MAX;
|
*((uint16_t *)val) = NRFMIN_PAYLOAD_MAX;
|
||||||
return sizeof(uint16_t);
|
return sizeof(uint16_t);
|
||||||
case NETOPT_ADDRESS_LONG:
|
|
||||||
assert(max_len >= sizeof(uint64_t));
|
|
||||||
nrfmin_get_pseudo_long_addr((uint16_t *)val);
|
|
||||||
return sizeof(uint64_t);
|
|
||||||
case NETOPT_ADDR_LEN:
|
case NETOPT_ADDR_LEN:
|
||||||
assert(max_len >= sizeof(uint16_t));
|
assert(max_len >= sizeof(uint16_t));
|
||||||
*((uint16_t *)val) = 2;
|
*((uint16_t *)val) = 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user