39#define CC2420_PKT_MAXLEN (IEEE802154_FRAME_LEN_MAX)
45#define CC2420_CHAN_MIN (IEEE802154_CHANNEL_MIN)
46#define CC2420_CHAN_MAX (IEEE802154_CHANNEL_MAX)
47#define CC2420_CHAN_DEFAULT (CONFIG_IEEE802154_DEFAULT_CHANNEL)
54#define CC2420_TXPOWER_MIN (-25)
55#define CC2420_TXPOWER_MAX (0)
56#define CC2420_TXPOWER_DEFAULT (CONFIG_IEEE802154_DEFAULT_TXPOWER)
62#define CC2420_RSSI_OFFSET (-45)
68 CC2420_RET_CHAN_OK = 2,
Definitions for netdev common IEEE 802.15.4 code.
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
void cc2420_get_addr_short(cc2420_t *dev, uint8_t *addr)
Get the short address of the given device.
void cc2420_set_pan(cc2420_t *dev, uint16_t pan)
Set the PAN ID of the given device.
int16_t cc2420_get_txpower(cc2420_t *dev)
Get the configured transmission power of the given device [in dBm].
void cc2420_set_txpower(cc2420_t *dev, int16_t txpower)
Set the transmission power of the given device [in dBm].
int cc2420_rx(cc2420_t *dev, uint8_t *buf, size_t max_len, void *info)
Read a chunk of data from the receive buffer of the given device.
int cc2420_set_option(cc2420_t *dev, uint16_t option, bool state)
Enable or disable driver specific options.
void cc2420_set_addr_long(cc2420_t *dev, const uint8_t *addr_long)
Set the long address of the given device.
void cc2420_setup(cc2420_t *dev, const cc2420_params_t *params, uint8_t index)
Setup the device descriptor for the given device.
uint16_t cc2420_get_chan(cc2420_t *dev)
Get the configured channel of the given device.
struct cc2420_params cc2420_params_t
Struct holding all parameters needed for device initialization.
bool cc2420_cca(cc2420_t *dev)
Trigger a clear channel assessment.
size_t cc2420_tx_prepare(cc2420_t *dev, const iolist_t *iolist)
Prepare for sending of data.
int cc2420_init(cc2420_t *dev)
Initialize a given CC2420 device.
void cc2420_tx_exec(cc2420_t *dev)
Trigger sending of data previously loaded into transmit buffer.
netopt_state_t cc2420_get_state(cc2420_t *dev)
Get the state of the given device.
void cc2420_get_addr_long(cc2420_t *dev, uint8_t *addr_long)
Get the configured long address of the given device.
uint16_t cc2420_get_pan(cc2420_t *dev)
Get the configured PAN ID of the given device.
void cc2420_set_addr_short(cc2420_t *dev, const uint8_t *addr)
Set the short address of the given device.
int cc2420_reset(cc2420_t *dev)
Trigger a hardware reset and configure radio with default values.
int cc2420_set_chan(cc2420_t *dev, uint16_t chan)
Set the channel of the given device.
int cc2420_set_state(cc2420_t *dev, netopt_state_t state)
Set the state of the given device (trigger a state change)
size_t cc2420_send(cc2420_t *dev, const iolist_t *iolist)
Convenience function for simply sending data.
netopt_state_t
Option parameter to be used with NETOPT_STATE to set or get the state of a network device or protocol...
Low-level SPI peripheral driver interface definition.
Struct holding all parameters needed for device initialization.
gpio_t pin_cca
pin connected to CCA
gpio_t pin_reset
pin connected to the reset pin
spi_clk_t spi_clk
SPI speed to use.
gpio_t pin_fifo
pin connected to the FIFO interrupt pin
gpio_t pin_cs
pin connected to chip select
gpio_t pin_vrefen
pin connected to the Vref enable pin
gpio_t pin_fifop
pin connected to the FIFOP interrupt pin
spi_t spi
SPI bus the device is connected to.
gpio_t pin_sfd
pin connected to 'start of frame delimiter'
Device descriptor for CC2420 radio devices.
uint16_t options
state of used options
cc2420_params_t params
hardware interface configuration
uint8_t state
current state of the radio
netdev_ieee802154_t netdev
netdev parent struct
iolist structure definition
Extended structure to hold IEEE 802.15.4 driver state.