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. More... | |
Functions | |
static uint8_t | rf_is_on (void) |
Checks whether the RFC domain is accessible and the RFC is in IEEE RX. More... | |
static uint8_t | transmitting (void) |
Check the RF's TX status. More... | |
static uint8_t | get_cca_info (void) |
Returns CCA information. More... | |
static radio_value_t | get_rssi (void) |
Reads the current signal strength (RSSI) More... | |
static uint8_t | rf_cmd_ieee_rx () |
Set up radio in IEEE802.15.4 RX mode. More... | |
#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 131 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_GET_CCA_INFO_ERROR if the RF is off
This function will in fact wait for a valid CCA state
Definition at line 381 of file ieee-mode.c.
References rf_core_send_cmd(), and rf_is_on().
Referenced by rf_cmd_ieee_rx().
|
static |
Reads the current signal strength (RSSI)
This function reads the current RSSI on the currently configured channel.
Definition at line 417 of file ieee-mode.c.
References rf_core_init_radio_op(), rf_core_is_accessible(), rf_core_send_cmd(), rf_core_wait_cmd_done(), and rf_is_on().
Referenced by rf_cmd_ieee_rx().
|
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 548 of file ieee-mode.c.
References radio_driver::channel_clear, CLOCK_SECOND, ctimer_set(), get_cca_info(), radio_driver::get_object, get_rssi(), radio_driver::get_value, IEEE802154_DEFAULT_CHANNEL, LPM_MODULE, lpm_register_module(), lpm_sleep(), radio_driver::off, radio_driver::on, oscillators_request_hf_xosc(), oscillators_switch_to_hf_rc(), oscillators_switch_to_hf_xosc(), radio_driver::pending_packet, radio_driver::prepare, process_poll(), process_start(), RADIO_RX_MODE_ADDRESS_FILTER, RADIO_TX_MODE_SEND_ON_CCA, radio_driver::receiving_packet, rf_ble_is_active(), rf_core_boot(), rf_core_cmd_done_dis(), rf_core_cmd_done_en(), rf_core_get_last_radio_op(), rf_core_init_radio_op(), rf_core_is_accessible(), rf_core_power_down(), rf_core_primary_mode_register(), rf_core_restart_rat(), rf_core_send_cmd(), rf_core_set_modesel(), rf_core_setup_interrupts(), rf_is_on(), RF_RADIO_OP_GET_STATUS, RTIMER_NOW, radio_driver::send, radio_driver::set_object, radio_driver::set_value, radio_driver::transmit, and transmitting().
|
static |
Checks whether the RFC domain is accessible and the RFC is in IEEE RX.
Definition at line 324 of file ieee-mode.c.
References rf_core_is_accessible(), and RF_RADIO_OP_GET_STATUS.
Referenced by get_cca_info(), get_rssi(), and rf_cmd_ieee_rx().
|
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 342 of file ieee-mode.c.
References rf_core_is_accessible(), and rf_core_send_cmd().
Referenced by rf_cmd_ieee_rx(), uart0_init(), and uart1_init().