Contiki-NG
|
Files | |
file | ieee-mode.c |
Implementation of the CC13xx/CC26xx IEEE mode NETSTACK_RADIO driver. | |
Macros | |
#define | RF_RADIO_OP_GET_STATUS(a) (((rfc_radioOp_t *)a)->status) |
Returns the current status of a running Radio Op command. | |
Functions | |
static uint8_t | rf_is_on (void) |
Checks whether the RFC domain is accessible and the RFC is in IEEE RX. | |
static uint8_t | transmitting (void) |
Check the RF's TX status. | |
static uint8_t | get_cca_info (void) |
Returns CCA information. | |
static radio_value_t | get_rssi (void) |
Reads the current signal strength (RSSI) | |
static uint8_t | rf_cmd_ieee_rx () |
Set up radio in IEEE802.15.4 RX mode. | |
#define RF_RADIO_OP_GET_STATUS | ( | a | ) | (((rfc_radioOp_t *)a)->status) |
Returns the current status of a running Radio Op command.
a | A pointer with the buffer used to initiate the command |
This macro can be used to e.g. return the status of a previously initiated background operation, or of an immediate command
Definition at line 133 of file ieee-mode.c.
Referenced by rf_cmd_ieee_rx(), and rf_is_on().
|
static |
Returns CCA information.
It is the caller's responsibility to make sure the RF is on. This function will return RF_CORE_GET_CCA_INFO_ERROR if the RF is off
This function will in fact wait for a valid CCA state
Definition at line 324 of file ieee-mode.c.
References rf_core_send_cmd(), and rf_is_on().
|
static |
Reads the current signal strength (RSSI)
This function reads the current RSSI on the currently configured channel.
Definition at line 360 of file ieee-mode.c.
References rf_core_send_cmd(), and rf_is_on().
|
static |
Set up radio in IEEE802.15.4 RX mode.
This function assumes that cmd_ieee_rx_buf has been previously populated with correct values. This can be done through init_rf_params (sets defaults) or through Contiki's extended RF API (set_value, set_object)
Definition at line 491 of file ieee-mode.c.
References rf_core_send_cmd(), RF_RADIO_OP_GET_STATUS, and RTIMER_BUSYWAIT_UNTIL.
|
static |
Checks whether the RFC domain is accessible and the RFC is in IEEE RX.
Definition at line 267 of file ieee-mode.c.
References rf_core_is_accessible(), and RF_RADIO_OP_GET_STATUS.
Referenced by get_cca_info(), and get_rssi().
|
static |
Check the RF's TX status.
TX mode may be triggered either by a CMD_IEEE_TX or by the automatic transmission of an ACK frame.
Definition at line 285 of file ieee-mode.c.
References rf_core_is_accessible(), and rf_core_send_cmd().