cc1xxx_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universität Berlin
3  * 2018 Otto-von-Guericke-Universität Magdeburg
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
58 #ifndef CC1XXX_COMMON_H
59 #define CC1XXX_COMMON_H
60 
61 #include "net/gnrc/netif.h"
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
70 #ifdef MODULE_GNRC_SIXLOWPAN
71 #define CC1XXX_DEFAULT_PROTOCOL (GNRC_NETTYPE_SIXLOWPAN)
72 #else
73 #define CC1XXX_DEFAULT_PROTOCOL (GNRC_NETTYPE_UNDEF)
74 #endif
75 
79 #define CC1XXX_ADDR_SIZE (1)
80 
84 #define CC1XXX_BCAST_ADDR (0x00)
85 
91 typedef struct __attribute__((packed)) {
92  uint8_t dest_addr;
93  uint8_t src_addr;
95 
105 typedef struct {
107  uint8_t addr;
108 } cc1xxx_t;
109 
114 
130 int gnrc_netif_cc1xxx_create(gnrc_netif_t *netif, char *stack, int stacksize,
131  char priority, char *name, netdev_t *dev);
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* CC1XXX_COMMON_H */
138 
cc1xxx_l2hdr_t::src_addr
uint8_t src_addr
Source layer 2 address.
Definition: cc1xxx_common.h:93
cc1xxx_t::addr
uint8_t addr
Layer 2 address of this device.
Definition: cc1xxx_common.h:107
gnrc_netif_cc1xxx_create
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.
cc1xxx_l2hdr_t::dest_addr
uint8_t dest_addr
Destination layer 2 address.
Definition: cc1xxx_common.h:92
cc1xxx_t
Users of the CC110x/CC1200 adaption layer have to overlap their device handle with this structure.
Definition: cc1xxx_common.h:105
gnrc_netif_t
Representation of a network interface.
Definition: netif.h:115
cc1xxx_t::netdev
netdev_t netdev
RIOT's interface to this driver.
Definition: cc1xxx_common.h:106
netdev
Structure to hold driver state.
Definition: netdev.h:302
netif.h
Definition for GNRC's network interfaces.
cc1xxx_l2hdr_t
Layer 2 header used in CC1xxx frames.
Definition: cc1xxx_common.h:91
netdev_radio_rx_info
Received frame status information for most radios.
Definition: netdev.h:258