Typedefs | |
typedef uint8_t | radio_ram_t |
typedef uint8_t | radio_reg_t |
Functions | |
radio_reg_t | trx_bit_read (sregid_t sregid) |
void | trx_bit_write (sregid_t sregid, radio_reg_t val) |
uint8_t | trx_frame_length_read (void) |
uint8_t | trx_frame_read (uint8_t *frame) |
void | trx_frame_write (uint8_t length, uint8_t *frame) |
void | trx_pinset_reset (bool val) |
void | trx_pinset_slptr (bool val) |
void | trx_pinset_tst (bool val) |
radio_reg_t | trx_reg_read (uint8_t addr) |
void | trx_reg_write (uint8_t addr, radio_reg_t val) |
void | trx_sram_read (radio_ram_t addr, uint8_t length, uint8_t *data) |
void | trx_sram_write (radio_ram_t addr, uint8_t length, uint8_t *data) |
typedef uint8_t radio_ram_t |
Abstract type of a radio transceiver SRAM address (8 bit).
typedef uint8_t radio_reg_t |
Abstract type of a radio transceiver register (8 bit).
radio_reg_t trx_bit_read | ( | sregid_t | sregid | ) |
Read the value from a subregister.
sregid | One of the SR_* macros, which are described here. These macros are triples of the following parameters (uint8_t addr, radio_reg_t mask, uint8_t pos) |
void trx_bit_write | ( | sregid_t | sregid, | |
radio_reg_t | val | |||
) |
Write a value to a subregister.
sregid | One of the SR_* macros, which are described here. These macros are triples of the following parameters (uint8_t addr, radio_reg_t mask, uint8_t pos) | |
val | value which is written to the sub register |
uint8_t trx_frame_length_read | ( | void | ) |
Read the length of a received frame.
uint8_t trx_frame_read | ( | uint8_t * | frame | ) |
Read a frame from the radio transceiver.
frame | Pointer to an array that takes the received bytes. The array must be able to store (aMaxPHYPacketSize + 2) bytes. The array will receive the frame length byte at index 0, followed by the received frame data, and finally an LQI byte. The length byte accounts for the frame length and the LQI byte, but not for its own size. |
void trx_frame_write | ( | uint8_t | length, | |
uint8_t * | frame | |||
) |
Write a frame to the radio transceiver.
length | Number of the bytes in the data array. | |
frame | Pointer to an array of bytes that will be sent. |
void trx_pinset_reset | ( | bool | val | ) |
Set the level of the RESET pin.
val | 0 for LOW or 1 for HIGH level of the pin |
void trx_pinset_slptr | ( | bool | val | ) |
Set the level of the SLP_TR pin.
val | 0 for LOW or 1 for HIGH level of the pin |
void trx_pinset_tst | ( | bool | val | ) |
Set the level of the TST pin.
val | 0 for LOW or 1 for HIGH level of the pin |
radio_reg_t trx_reg_read | ( | uint8_t | addr | ) |
Read the value from a register.
addr | a value or variable of uint8_t, the offset of the register |
void trx_reg_write | ( | uint8_t | addr, | |
radio_reg_t | val | |||
) |
Write a value to a register.
addr | a value or variable of uint8_t, the offset of the register | |
val | a variable name of radio_reg_t |
void trx_sram_read | ( | radio_ram_t | addr, | |
uint8_t | length, | |||
uint8_t * | data | |||
) |
Read data from SRAM.
addr | start address in the SRAM | |
length | number of bytes to be read |
data | pointer to an array of bytes, where the read from the SRAM are stored. |
void trx_sram_write | ( | radio_ram_t | addr, | |
uint8_t | length, | |||
uint8_t * | data | |||
) |
Write data to SRAM.
addr | start address in the SRAM | |
length | number of bytes to be written | |
data | pointer to an array of bytes |