89 typedef unsigned radio_param_t;
95 RADIO_PARAM_POWER_MODE,
109 RADIO_PARAM_16BIT_ADDR,
148 RADIO_PARAM_CCA_THRESHOLD,
154 RADIO_PARAM_LAST_RSSI,
157 RADIO_PARAM_LAST_LINK_QUALITY,
166 RADIO_PARAM_64BIT_ADDR,
171 RADIO_PARAM_LAST_PACKET_TIMESTAMP,
176 RADIO_CONST_CHANNEL_MIN,
178 RADIO_CONST_CHANNEL_MAX,
181 RADIO_CONST_TXPOWER_MIN,
183 RADIO_CONST_TXPOWER_MAX
188 RADIO_POWER_MODE_OFF,
204 #define RADIO_RX_MODE_ADDRESS_FILTER (1 << 0) 205 #define RADIO_RX_MODE_AUTOACK (1 << 1) 206 #define RADIO_RX_MODE_POLL_MODE (1 << 2) 216 #define RADIO_TX_MODE_SEND_ON_CCA (1 << 0) 221 RADIO_RESULT_NOT_SUPPORTED,
222 RADIO_RESULT_INVALID_VALUE,
242 int (*
prepare)(
const void *payload,
unsigned short payload_len);
248 int (*
send)(
const void *payload,
unsigned short payload_len);
251 int (*
read)(
void *buf,
unsigned short buf_len);
280 radio_result_t (*
get_object)(radio_param_t param,
void *dest,
size_t size);
286 radio_result_t (*
set_object)(radio_param_t param,
const void *src,
radio_result_t(* get_object)(radio_param_t param, void *dest, size_t size)
Get a radio parameter object.
int(* prepare)(const void *payload, unsigned short payload_len)
Prepare the radio with a packet to be sent.
int(* receiving_packet)(void)
Check if the radio driver is currently receiving a packet.
radio_result_t(* set_value)(radio_param_t param, radio_value_t value)
Set a radio parameter value.
int(* pending_packet)(void)
Check if the radio driver has just received a packet.
The structure of a device driver for a radio in Contiki.
int(* channel_clear)(void)
Perform a Clear-Channel Assessment (CCA) to find out if there is a packet in the air or not...
int radio_value_t
Each radio has a set of parameters that designate the current configuration and state of the radio...
int(* send)(const void *payload, unsigned short payload_len)
Prepare & transmit a packet.
int(* transmit)(unsigned short transmit_len)
Send the packet that has previously been prepared.
int(* off)(void)
Turn the radio off.
int(* read)(void *buf, unsigned short buf_len)
Read a received packet into a buffer.
radio_result_t(* get_value)(radio_param_t param, radio_value_t *value)
Get a radio parameter value.
radio_result_t(* set_object)(radio_param_t param, const void *src, size_t size)
Set a radio parameter object.
int(* on)(void)
Turn the radio on.