Microchip® Advanced Software Framework

radio_driver Struct Reference

The structure of a device driver for a radio in Contiki.

#include <radio.h>

Data Fields

int(* channel_clear )(void)
 Perform a Clear-Channel Assessment (CCA) to find out if there is a packet in the air or not. More...
 
int(* init )(void)
 
int(* off )(void)
 Turn the radio off. More...
 
int(* on )(void)
 Turn the radio on. More...
 
int(* pending_packet )(void)
 Check if the radio driver has just received a packet. More...
 
int(* prepare )(const void *payload, unsigned short payload_len)
 Prepare the radio with a packet to be sent. More...
 
int(* read )(void *buf, unsigned short buf_len)
 Read a received packet into a buffer. More...
 
int(* receiving_packet )(void)
 Check if the radio driver is currently receiving a packet. More...
 
int(* send )(const void *payload, unsigned short payload_len)
 Prepare & transmit a packet. More...
 
int(* sleep )(void)
 Set the radio to deep sleep mode. More...
 
int(* transmit )(unsigned short transmit_len)
 Send the packet that has previously been prepared. More...
 

int(* radio_driver::channel_clear)(void)

Perform a Clear-Channel Assessment (CCA) to find out if there is a packet in the air or not.

Referenced by powercycle(), send_one_packet(), and send_packet().

int(* radio_driver::init)(void)

Referenced by netstack_init().

int(* radio_driver::off)(void)

Turn the radio off.

Referenced by off(), and turn_off().

int(* radio_driver::on)(void)

Turn the radio on.

Referenced by off(), on(), powercycle(), and turn_off().

int(* radio_driver::pending_packet)(void)

Check if the radio driver has just received a packet.

Referenced by powercycle(), send_one_packet(), and send_packet().

int(* radio_driver::prepare)(const void *payload, unsigned short payload_len)

Prepare the radio with a packet to be sent.

Referenced by send_one_packet(), and send_packet().

int(* radio_driver::read)(void *buf, unsigned short buf_len)

Read a received packet into a buffer.

Referenced by send_one_packet(), and send_packet().

int(* radio_driver::receiving_packet)(void)

Check if the radio driver is currently receiving a packet.

Referenced by powercycle(), send_one_packet(), and send_packet().

int(* radio_driver::send)(const void *payload, unsigned short payload_len)

Prepare & transmit a packet.

Referenced by packet_input(), send_one_packet(), and send_packet().

int(* radio_driver::sleep)(void)

Set the radio to deep sleep mode.

Referenced by powercycle().

int(* radio_driver::transmit)(unsigned short transmit_len)

Send the packet that has previously been prepared.

Referenced by send_one_packet(), and send_packet().