KW2x radio-driver

Device driver for the NXP CR20A and KW2xD radios. More...

Detailed Description


file  kw2xrf.h
 Interface definition for the kw2xrf driver.
file  kw2xrf_getset.h
 get/set interfaces for kw2xrf driver
file  kw2xrf_intern.h
 Internal function interfaces for kw2xrf driver.
file  kw2xrf_netdev.h
 Netdev interface for kw2xrf driver.
file  kw2xrf_reg.h
 Register and command definitions for the MKW2XD Modem.
file  kw2xrf_spi.h
 Definition of KW2XRF SPI functions.

Data Structures

struct  kw2xrf_params
 struct holding all params needed for device initialization More...
struct  kw2xrf_t
 Device descriptor for KW2XRF radio devices. More...


 Maximum packet length.
 Default PAN ID used after initialization.
 Default TX_POWER in dbm used after initialization.
 Maximum output power of the kw2x device in dBm.
#define KW2XDRF_OUTPUT_POWER_MIN   (-35)
 Minimum output power of the kw2x device in dBm.


typedef struct kw2xrf_params kw2xrf_params_t
 struct holding all params needed for device initialization


void kw2xrf_setup (kw2xrf_t *dev, const kw2xrf_params_t *params)
 Setup an KW2XRF based device state. More...
int kw2xrf_init (kw2xrf_t *dev, gpio_cb_t cb)
 Initialize the given KW2XRF device. More...
void kw2xrf_reset_phy (kw2xrf_t *dev)
 Configure radio with default values. More...
 Default channel used after initialization.
#define KW2XRF_MIN_CHANNEL   (11U)
 Allowed range of channels.
#define KW2XRF_MAX_CHANNEL   (26U)
 Internal device option flags. More...
 legacy define
 legacy define
#define KW2XRF_OPT_AUTOCCA   (0x0100)
 CCA befor TX active.
#define KW2XRF_OPT_PROMISCUOUS   (0x0200)
 promiscuous mode active
#define KW2XRF_OPT_PRELOADING   (0x0400)
 preloading enabled
#define KW2XRF_OPT_TELL_TX_START   (0x0800)
 notify MAC layer on TX start
#define KW2XRF_OPT_TELL_TX_END   (0x1000)
 notify MAC layer on TX finished
#define KW2XRF_OPT_TELL_RX_START   (0x2000)
 notify MAC layer on RX start
#define KW2XRF_OPT_TELL_RX_END   (0x4000)
 notify MAC layer on RX finished
#define KW2XRF_OPT_AUTOACK   (0x8000)
 enable automatically ACK for incommint packet

Macro Definition Documentation



0x00ff is reserved for general IEEE 802.15.4 flags (see netdev_ieee802154_t)legacy define

Definition at line 91 of file kw2xrf.h.

Function Documentation

◆ kw2xrf_init()

int kw2xrf_init ( kw2xrf_t dev,
gpio_cb_t  cb 
[out]devdevice descriptor
[in]cbirq callback
0 on success
<0 on error

◆ kw2xrf_reset_phy()

void kw2xrf_reset_phy ( kw2xrf_t dev)
[in]devdevice to reset

◆ kw2xrf_setup()

void kw2xrf_setup ( kw2xrf_t dev,
const kw2xrf_params_t params 
[out]devdevice descriptor
[in]paramsparameters for device initialization