Go to the documentation of this file.
43 #define KW2XRF_MAX_PKT_LENGTH (IEEE802154_FRAME_LEN_MAX)
53 #ifndef KW2XRF_DEFAULT_CHANNEL
54 #define KW2XRF_DEFAULT_CHANNEL (CONFIG_IEEE802154_DEFAULT_CHANNEL)
63 #define KW2XRF_MIN_CHANNEL (11U)
64 #define KW2XRF_MAX_CHANNEL (26U)
70 #define KW2XRF_DEFAULT_TX_POWER (CONFIG_IEEE802154_DEFAULT_TXPOWER)
75 #define KW2XDRF_OUTPUT_POWER_MAX (8)
80 #define KW2XDRF_OUTPUT_POWER_MIN (-35)
90 #define KW2XRF_OPT_SRC_ADDR_LONG (NETDEV_IEEE802154_SRC_MODE_LONG)
91 #define KW2XRF_OPT_RAWDUMP (NETDEV_IEEE802154_RAW)
92 #define KW2XRF_OPT_ACK_REQ (NETDEV_IEEE802154_ACK_REQ)
94 #define KW2XRF_OPT_AUTOCCA (0x0100)
95 #define KW2XRF_OPT_PROMISCUOUS (0x0200)
97 #define KW2XRF_OPT_PRELOADING (0x0400)
98 #define KW2XRF_OPT_TELL_TX_START (0x0800)
100 #define KW2XRF_OPT_TELL_TX_END (0x1000)
102 #define KW2XRF_OPT_TELL_RX_START (0x2000)
104 #define KW2XRF_OPT_TELL_RX_END (0x4000)
106 #define KW2XRF_OPT_AUTOACK (0x8000)
113 typedef struct kw2xrf_params {
uint8_t idle_state
state to return to after sending
Definitions for netdev common IEEE 802.15.4 code.
void kw2xrf_setup(kw2xrf_t *dev, const kw2xrf_params_t *params)
Setup an KW2XRF based device state.
#define KW2XRF_MAX_PKT_LENGTH
Maximum packet length.
spi_t spi
SPI bus the device is connected to.
Low-level SPI peripheral driver interface definition.
gpio_t int_pin
GPIO pin connected to the interrupt pin.
int kw2xrf_init(kw2xrf_t *dev, gpio_cb_t cb)
Initialize the given KW2XRF device.
uint8_t tx_frame_len
length of the current TX frame
void kw2xrf_reset_phy(kw2xrf_t *dev)
Configure radio with default values.
spi_clk_t
Available SPI clock speeds.
Definitions low-level network driver interface.
thread_t * thread
device specific fields
thread_t holds thread's context data.
Protocol type definitions.
Struct holding all params needed for device initialization.
gpio_t cs_pin
GPIO pin connected to chip select.
void(* gpio_cb_t)(void *arg)
Signature of event callback functions triggered from interrupts.
Extended structure to hold IEEE 802.15.4 driver state.
kw2xrf_params_t params
parameters for initialization
Low-level GPIO peripheral driver interface definitions.
int16_t tx_power
The current tx-power setting of the device.
uint8_t state
current state of the radio
spi_clk_t spi_clk
SPI clock speed to use.
netdev_ieee802154_t netdev
netdev parent struct
Device descriptor for KW2XRF radio devices.
struct kw2xrf_params kw2xrf_params_t
Struct holding all params needed for device initialization.
unsigned int spi_t
Default type for SPI devices.
uint8_t pending_tx
keep track of pending TX calls this is required to know when to return to kw2xrf_t::idle_state