Loading...
Searching...
No Matches
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
64extern "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
91typedef struct __attribute__((packed)) {
92 uint8_t dest_addr;
93 uint8_t src_addr;
95
105typedef struct {
107 uint8_t addr;
108} cc1xxx_t;
109
114
130int gnrc_netif_cc1xxx_create(gnrc_netif_t *netif, char *stack, int stacksize,
131 char priority, char *name, netdev_t *dev);
132
142void cc1xxx_eui_get(const netdev_t *dev, uint8_t *eui);
143
144#ifdef __cplusplus
145}
146#endif
147
148#endif /* CC1XXX_COMMON_H */
Definition for GNRC's network interfaces.
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.
void cc1xxx_eui_get(const netdev_t *dev, uint8_t *eui)
Retrieve a unique layer-2 address for a cc1xxx instance.
Layer 2 header used in CC1xxx frames.
uint8_t dest_addr
Destination layer 2 address.
uint8_t src_addr
Source layer 2 address.
Users of the CC110x/CC1200 adaption layer have to overlap their device handle with this structure.
netdev_t netdev
RIOT's interface to this driver.
uint8_t addr
Layer 2 address of this device.
Representation of a network interface.
Definition netif.h:135
Received frame status information for most radios.
Definition netdev.h:279
Structure to hold driver state.
Definition netdev.h:362