Files | Macros | Functions


file  ieee-mode.c
 Implementation of the CC13xx/CC26xx IEEE mode NETSTACK_RADIO driver.


#define RF_RADIO_OP_GET_STATUS(a)   (((rfc_radioOp_t *)a)->status)
 Returns the current status of a running Radio Op command. More...


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...

Detailed Description

Macro Definition Documentation


#define RF_RADIO_OP_GET_STATUS (   a)    (((rfc_radioOp_t *)a)->status)

Returns the current status of a running Radio Op command.

aA pointer with the buffer used to initiate the command
The value of the Radio Op buffer's status field

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_is_on().

Function Documentation

◆ get_cca_info()

static uint8_t get_cca_info ( void  )

Returns CCA information.

RF_CORE_GET_CCA_INFO_ERROR if the RF was not on
On success, the return value is formatted as per the ccaInfo field of CMD_IEEE_CCA_REQ

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.

◆ get_rssi()

static radio_value_t get_rssi ( void  )

Reads the current signal strength (RSSI)

The current RSSI in dBm or CMD_GET_RSSI_UNKNOWN

This function reads the current RSSI on the currently configured channel.

Definition at line 360 of file ieee-mode.c.

◆ rf_cmd_ieee_rx()

static uint8_t rf_cmd_ieee_rx ( )

Set up radio in IEEE802.15.4 RX mode.

RF_CORE_CMD_OK Succeeded

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_is_on()

static uint8_t rf_is_on ( void  )

Checks whether the RFC domain is accessible and the RFC is in IEEE RX.

1: RFC in RX mode (and therefore accessible too). 0 otherwise

Definition at line 267 of file ieee-mode.c.

References rf_core_is_accessible(), and RF_RADIO_OP_GET_STATUS.

◆ transmitting()

static uint8_t transmitting ( void  )

Check the RF's TX status.

1 RF is transmitting
0 RF is not transmitting

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.

Referenced by uart0_init().