The structure of a device driver for a radio in Contiki.
More...
#include <os/dev/radio.h>
|
| int(* | prepare )(const void *payload, unsigned short payload_len) |
| | Prepare the radio with a packet to be sent. More...
|
| |
| int(* | transmit )(unsigned short transmit_len) |
| | Send the packet that has previously been prepared. More...
|
| |
| int(* | send )(const void *payload, unsigned short payload_len) |
| | Prepare & transmit a packet. More...
|
| |
| int(* | read )(void *buf, unsigned short buf_len) |
| | Read a received packet into a buffer. More...
|
| |
| 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(* | receiving_packet )(void) |
| | Check if the radio driver is currently receiving a packet.
|
| |
|
int(* | pending_packet )(void) |
| | Check if the radio driver has just received a packet.
|
| |
| int(* | on )(void) |
| | Turn the radio on. More...
|
| |
| int(* | off )(void) |
| | Turn the radio off. More...
|
| |
| radio_result_t(* | get_value )(radio_param_t param, radio_value_t *value) |
| | Get a radio parameter value. More...
|
| |
| radio_result_t(* | set_value )(radio_param_t param, radio_value_t value) |
| | Set a radio parameter value. More...
|
| |
| radio_result_t(* | get_object )(radio_param_t param, void *dest, size_t size) |
| | Get a radio parameter object. More...
|
| |
| radio_result_t(* | set_object )(radio_param_t param, const void *src, size_t size) |
| | Set a radio parameter object. More...
|
| |
The structure of a device driver for a radio in Contiki.
Definition at line 285 of file radio.h.
◆ channel_clear
| 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.
Definition at line 303 of file radio.h.
◆ get_object
| radio_result_t(* radio_driver::get_object) (radio_param_t param, void *dest, size_t size) |
Get a radio parameter object.
The argument 'dest' must point to a memory area of at least 'size' bytes, and this memory area will contain the parameter object if the function succeeds.
Definition at line 328 of file radio.h.
◆ get_value
Get a radio parameter value.
Definition at line 318 of file radio.h.
◆ off
| int(* radio_driver::off) (void) |
Turn the radio off.
Definition at line 315 of file radio.h.
◆ on
| int(* radio_driver::on) (void) |
Turn the radio on.
Definition at line 312 of file radio.h.
◆ prepare
| int(* radio_driver::prepare) (const void *payload, unsigned short payload_len) |
Prepare the radio with a packet to be sent.
Definition at line 290 of file radio.h.
◆ read
| int(* radio_driver::read) (void *buf, unsigned short buf_len) |
Read a received packet into a buffer.
Definition at line 299 of file radio.h.
◆ send
| int(* radio_driver::send) (const void *payload, unsigned short payload_len) |
Prepare & transmit a packet.
Definition at line 296 of file radio.h.
◆ set_object
| radio_result_t(* radio_driver::set_object) (radio_param_t param, const void *src, size_t size) |
Set a radio parameter object.
The memory area referred to by the argument 'src' will not be accessed after the function returns.
Definition at line 334 of file radio.h.
◆ set_value
Set a radio parameter value.
Definition at line 321 of file radio.h.
◆ transmit
| int(* radio_driver::transmit) (unsigned short transmit_len) |
Send the packet that has previously been prepared.
Definition at line 293 of file radio.h.