89 typedef unsigned radio_param_t;
95 RADIO_PARAM_POWER_MODE,
109 RADIO_PARAM_16BIT_ADDR,
148 RADIO_PARAM_CCA_THRESHOLD,
160 RADIO_PARAM_64BIT_ADDR,
165 RADIO_CONST_CHANNEL_MIN,
167 RADIO_CONST_CHANNEL_MAX,
170 RADIO_CONST_TXPOWER_MIN,
172 RADIO_CONST_TXPOWER_MAX
177 RADIO_POWER_MODE_OFF,
193 #define RADIO_RX_MODE_ADDRESS_FILTER (1 << 0)
194 #define RADIO_RX_MODE_AUTOACK (1 << 1)
204 #define RADIO_TX_MODE_SEND_ON_CCA (1 << 0)
209 RADIO_RESULT_NOT_SUPPORTED,
210 RADIO_RESULT_INVALID_VALUE,
230 int (*
prepare)(
const void *payload,
unsigned short payload_len);
236 int (*
send)(
const void *payload,
unsigned short payload_len);
239 int (*
read)(
void *buf,
unsigned short buf_len);
268 radio_result_t (*
get_object)(radio_param_t param,
void *dest,
size_t size);
274 radio_result_t (*
set_object)(radio_param_t param,
const void *src,
The structure of a device driver for a radio in Contiki.
int(* pending_packet)(void)
Check if the radio driver has just received a packet.
int radio_value_t
Each radio has a set of parameters that designate the current configuration and state of the radio...
int(* prepare)(const void *payload, unsigned short payload_len)
Prepare the radio with a packet to be sent.
int(* send)(const void *payload, unsigned short payload_len)
Prepare & transmit a packet.
int(* receiving_packet)(void)
Check if the radio driver is currently receiving a packet.
int(* channel_clear)(void)
Perform a Clear-Channel Assessment (CCA) to find out if there is a packet in the air or not...
int(* on)(void)
Turn the radio on.
radio_result_t(* get_value)(radio_param_t param, radio_value_t *value)
Get a radio parameter value.
radio_result_t(* get_object)(radio_param_t param, void *dest, size_t size)
Get a radio parameter object.
int(* transmit)(unsigned short transmit_len)
Send the packet that has previously been prepared.
radio_result_t(* set_object)(radio_param_t param, const void *src, size_t size)
Set a radio parameter object.
radio_result_t(* set_value)(radio_param_t param, radio_value_t value)
Set a radio parameter value.
int(* read)(void *buf, unsigned short buf_len)
Read a received packet into a buffer.
int(* off)(void)
Turn the radio off.