mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Add Rime address macros
This commit is contained in:
@@ -124,6 +124,9 @@ endif # NET_6LOWPAN_COMPRESSION_HC06
|
|||||||
config NET_6LOWPAN_RIMEADDR_SIZE
|
config NET_6LOWPAN_RIMEADDR_SIZE
|
||||||
int "Rime address size"
|
int "Rime address size"
|
||||||
default 2
|
default 2
|
||||||
|
range 2 8
|
||||||
|
---help---
|
||||||
|
Only the values 2 and 8 are supported
|
||||||
|
|
||||||
config NET_SIXLOWPAN_MAXAGE
|
config NET_SIXLOWPAN_MAXAGE
|
||||||
int "Packet reassembly timeout"
|
int "Packet reassembly timeout"
|
||||||
|
|||||||
@@ -45,10 +45,24 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_NET_6LOWPAN
|
#ifdef CONFIG_NET_6LOWPAN
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Rime addres macros */
|
||||||
|
|
||||||
|
#define rimeaddr_copy(dest,src) \
|
||||||
|
memcpy(dest, src, CONFIG_NET_6LOWPAN_RIMEADDR_SIZE)
|
||||||
|
|
||||||
|
#define rimeaddr_cmp(addr1,addr2) \
|
||||||
|
(memcmp(addr1, addr2, CONFIG_NET_6LOWPAN_RIMEADDR_SIZE) == 0)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Rime address representation */
|
||||||
|
|
||||||
struct rimeaddr_s
|
struct rimeaddr_s
|
||||||
{
|
{
|
||||||
uint8_t u8[CONFIG_NET_6LOWPAN_RIMEADDR_SIZE];
|
uint8_t u8[CONFIG_NET_6LOWPAN_RIMEADDR_SIZE];
|
||||||
|
|||||||
Reference in New Issue
Block a user