CC110x/CC1200 adaption for Network interface API. More...

Detailed Description

CC110x/CC1200 adaption for Network interface API.

Author
Martine Lenders m.len.nosp@m.ders.nosp@m.@fu-b.nosp@m.erli.nosp@m.n.de
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Supported Transceivers

This adaption layer is written to be used by CC110x and CC1200 transceivers, but any transceiver using layer 2 addresses which are 1 byte in size would likely be able to use it. Keep in mind that both CC110x and CC1200 are able to transmit frames of up to 255 bytes (thus 253 bytes of payload, as the layer 2 header is 2 bytes in size). Other transceivers only supporting smaller frames may not be able to use all the upper layer protocols supported by the CC110x and CC1200 transceivers.

Frame Format

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Destination  |    Source     |  Payload...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Field Description
Destination The layer 2 destination address
Source The layer 2 source address
Payload The payload (variable size)

Layer 2 Broadcast

This adaption layer assumes that the layer 2 address 0x00 (see CC1XXX_BCAST_ADDR) is reserved for layer 2 broadcast, which is true for CC110x and CC1200 transceivers (provided they are configured accordingly). If more users of this adaption layer are added, this behaviour might needs to be more generalized.

Definition in file cc1xxx_common.h.

#include "net/gnrc/netif.h"
+ Include dependency graph for cc1xxx_common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cc1xxx_l2hdr_t
 Layer 2 header used in CC1xxx frames. More...
 
struct  cc1xxx_t
 Users of the CC110x/CC1200 adaption layer have to overlap their device handle with this structure. More...
 

Macros

#define CC1XXX_DEFAULT_PROTOCOL   (GNRC_NETTYPE_SIXLOWPAN)
 Default protocol for data that is coming in.
 
#define CC1XXX_ADDR_SIZE   (1)
 Size of a layer 2 address on CC110x/CC1200 transceivers.
 
#define CC1XXX_BCAST_ADDR   (0x00)
 Special layer 2 address reserved for broadcast frames.
 

Typedefs

typedef struct netdev_radio_rx_info cc1xxx_rx_info_t
 Statistics for one received frame.
 

Functions

int gnrc_netif_cc1xxx_create (gnrc_netif_t *netif, char *stack, int stacksize, char priority, char *name, netdev_t *dev)
 Creates a CC110x/CC1200 network interface. More...