Radio abstraction layer common interface. More...
Modules |
|
| RAL Special API | |
| RAL FSM API | |
| RAL FSM private API | |
| RAL auxiliary functions | |
| RAL RF initialization API | |
Data Structures |
|
| struct | ral_mem_t |
Typedefs |
|
| typedef volatile uint8_t | ral_atomic_t |
|
RAL atomic section.
|
|
Functions |
|
| void | ral_init (void) |
|
Initializes radio abstraction layer.
|
|
| void | ral_reset (void) |
|
Resets radio abstraction layer.
|
|
| uint8_t | ral_ed_perform (void) |
|
Performs synchronous ED measurement.
|
|
| phy_enum_t | ral_state_set (const phy_enum_t state) |
|
Sends request to change radio state.
More...
|
|
| phy_enum_t | ral_state_get (void) |
|
Returns current state of radio.
|
|
| void | ral_sleep (void) |
|
Puts radio into sleep mode.
|
|
| void | ral_wakeup (void) |
|
Awakes a radio.
|
|
| phy_status_t | ral_cca_perform (void) |
|
Performs synchronous cca.
|
|
| void | ral_data_req ( pd_data_req_t *pd_data) |
|
Sends PHY frame.
More...
|
|
| pd_data_ind_t * | ral_data_ind_read (void) |
|
Reads indication frame from radio.
More...
|
|
| void | ral_data_flow_enable (void) |
|
Enable data flow from radio hardware after it was disabled by
ral_data_flow_disable()
.
|
|
| void | ral_data_flow_disable (void) |
|
Disable data flow from radio hardware.
|
|
| void | ral_attribute_set (uint8_t id, const void *p_value) |
|
This function is used to set attribute from MAC or PHY layer without checking of its boundaries.
More...
|
|
| void | ral_attribute_get (uint8_t id, void *p_attr_value) |
|
This function is used to get a copy of attribute value stored inside radio module.
More...
|
|
| mac_timestamp_t | ral_rx_start_time ( mac_timestamp_t irq_time, uint8_t frame_size) |
|
This function is used to define frame start time by it's size and the timestamp, when RX IRQ has been received.
More...
|
|
| uint8_t | ral_rssi_get (void) |
|
This function performs RSSI.
More...
|
|
Detailed Description
Radio abstraction layer common interface.
These are requirements for the implementation code:
- no frames must be received between new frame indication and
a call to ral_data_ind_read.
Function Documentation
| void ral_attribute_get | ( | uint8_t | id , |
| void * | p_attr_value | ||
| ) |
This function is used to get a copy of attribute value stored inside radio module.
- Parameters
-
[in] id - one of PHY_CURRENT_CHANNEL_ID , PHY_TRANSMIT_POWER_ID or PHY_CCA_MODE_ID . Other attributes are not supported. [out] p_attr_value - pointer to value to get.
| void ral_attribute_set | ( | uint8_t | id , |
| const void * | p_value | ||
| ) |
This function is used to set attribute from MAC or PHY layer without checking of its boundaries.
- Parameters
-
id - one of MAC_SHORT_ADDRESS , MAC_EXTENDED_ADDRESS , MAC_PAN_ID and some other values. p_value - pointer to new value.
| pd_data_ind_t * ral_data_ind_read | ( | void | ) |
Reads indication frame from radio.
- Return values
-
Pointer on the structure of a PHY data indication with received frame.
| void ral_data_req | ( | pd_data_req_t * | pd_data | ) |
Sends PHY frame.
- Parameters
-
[in] pd_data - full data frame to be send.
RAL automatically adds header and FCS control bytes to pd_data . Caller must reserve 1 byte before psdu pointer and may leave last two bytes of payload (i.e. FCS control field) uninitialized.
RF chip or RAL code is responsible to receive an ACK frame. After ACK is handled, device should be restored to the TX state.
| uint8_t ral_rssi_get | ( | void | ) |
This function performs RSSI.
- Return values
-
RSSI sample value.
| mac_timestamp_t ral_rx_start_time | ( | mac_timestamp_t | irq_time , |
| uint8_t | frame_size | ||
| ) |
This function is used to define frame start time by it's size and the timestamp, when RX IRQ has been received.
- Parameters
-
irq_time - moment when IRQ has been received. frame_size - size of received frame in bytes.
- Return values
-
MAC timestamp when PHY header has been started to receive.
| phy_enum_t ral_state_set | ( | const phy_enum_t | state | ) |
Sends request to change radio state.
- Parameters
-
state - New radio state. One of...
- Returns
- PHY_SUCCESS, if state has been successfully achieved; current state, if state cannot be reached.