Functions | |
| void | trx_aes_io (aes_access_t mode, uint8_t cmd, bool start, uint8_t *idata, uint8_t *odata) |
| void | trx_aes_read (uint8_t cmd, uint8_t *odata) |
| void | trx_aes_write (uint8_t cmd, bool start, uint8_t *idata) |
| void | trx_aes_wrrd (uint8_t cmd, bool start, uint8_t *idata, uint8_t *odata) |
| radio_reg_t | trx_bit_read (radio_addr_t addr, radio_reg_t mask, uint8_t pos) |
| void | trx_bit_write (radio_addr_t addr, radio_reg_t mask, uint8_t pos, radio_reg_t val) |
| uint8_t | trx_frame_length_read (void) |
| uint8_t | trx_frame_read (uint8_t *frame) |
| uint8_t | trx_frame_read_blm (uint8_t *d) |
| void | trx_frame_write (uint8_t length, uint8_t *frame) |
| void | trx_io_init (void) |
| void | trx_irq_init (void) |
| void | trx_pinset_reset (bool val) |
| void | trx_pinset_slptr (bool val) |
| void | trx_pinset_tst (bool val) |
| radio_reg_t | trx_reg_read (radio_addr_t addr) |
| void | trx_reg_write (radio_addr_t addr, radio_reg_t val) |
| void | trx_require_irq_callback (void) |
| 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) |
| void | usr_trx_main_irq (uint8_t irqstatus) |
| void trx_aes_io | ( | aes_access_t | mode, | |
| uint8_t | cmd, | |||
| bool | start, | |||
| uint8_t * | idata, | |||
| uint8_t * | odata | |||
| ) |
Low Level AES access function.
| mode | AES access mode, one of the macros: | |
| cmd | AES control byte (excluding start bit) | |
| start | flag that indicates, if the start bit will be set for these transaction | |
| idata | 16 byte data array, written to the AES block |
| odata | 16 byte data array, read from the AES block |
| void trx_aes_read | ( | uint8_t | cmd, | |
| uint8_t * | odata | |||
| ) |
Read data from AES block.
| cmd | AES control byte (excluding start bit) |
| odata | 16 byte data array, read from the AES block. |
| void trx_aes_write | ( | uint8_t | cmd, | |
| bool | start, | |||
| uint8_t * | idata | |||
| ) |
Write data to the AES block.
| cmd | AES control byte (excluding start bit) | |
| start | flag that indicates, if the start bit will be set for these transaction | |
| idata | 16 byte data array, written to the AES block |
| void trx_aes_wrrd | ( | uint8_t | cmd, | |
| bool | start, | |||
| uint8_t * | idata, | |||
| uint8_t * | odata | |||
| ) |
Write and read data from AES block simultaneously.
| cmd | AES control byte (excluding start bit) | |
| start | flag that indicates, if the start bit will be set for these transaction | |
| idata | 16 byte data array, written to the AES block |
| odata | 16 byte data array, read from the AES block |
| radio_reg_t trx_bit_read | ( | radio_addr_t | addr, | |
| radio_reg_t | mask, | |||
| uint8_t | pos | |||
| ) |
Read a value from a subregister.
| addr | value or variable of uint8_t, the offset of the register | |
| mask | mask value of the bit group (at original position) | |
| pos | shift value of the bit group |
| void trx_bit_write | ( | radio_addr_t | addr, | |
| radio_reg_t | mask, | |||
| uint8_t | pos, | |||
| radio_reg_t | val | |||
| ) |
Write a value to a subregister.
| addr | value or variable of uint8_t, the offset of the register | |
| mask | mask value of the bit group (at original position) | |
| pos | shift value of the bit group | |
| 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. |
| uint8_t trx_frame_read_blm | ( | uint8_t * | d | ) |
Read frame in buffer level mode.
This function does a frame read in buffer level mode. The frame should be read out during reception of the frame and should be finished after the end of the frame was received. The buffer empty signal should never occur. For it, the interrupt pin is overloaded in the buffer level mode to indicate an empty buffer. A buffer empty is signalled by overwriting the frame length byte with zero. Thus, a check of the frame length byte==0 is sufficient.
| d | Pointer to an array of Payload bytes that should be read |
| 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_io_init | ( | void | ) |
Transceiver IO initialization function.
This function must be called before any other function in the API. It configures the radio IO pins.
| void trx_irq_init | ( | void | ) |
Transceiver IRQ initialization function.
This function have to be called in order to enable the transceiver interrupts in the AVR.
| 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 | ( | radio_addr_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 | ( | radio_addr_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_require_irq_callback | ( | void | ) |
Linker hook to the library provided ISR.
A call to this dummy function causes the linker to link the predefined interrupt service routine.
See also Interrupt Configuration and Handling.
| 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 |
| void usr_trx_main_irq | ( | uint8_t | irqstatus | ) |
Callback for library defined IRQ service routine.
If the library defined ISR is linked, this function will be called, if a radio transceiver interrupt occurs.
See also Interrupt Configuration and Handling .
| irqstatus | current value of the RG_IRQ_STATUS register |
1.5.6