Interface for Transceiver Access Functions. More...
Go to the source code of this file.
Defines | |
#define | BPSK20 (0x52) |
#define | BPSK20_STR "BPSK20" |
#define | BPSK40 (0x92) |
#define | BPSK40_STR "BPSK40" |
#define | INVALID_PART_NUM (2) |
#define | INVALID_REV_NUM (1) |
#define | MAX_FRAME_SIZE (127) |
#define | OQPSK100 (0x90) |
#define | OQPSK1000 (0x34) |
#define | OQPSK1000_STR "OQPSK1000" |
#define | OQPSK100_STR "OQPSK100" |
#define | OQPSK200 (0x93) |
#define | OQPSK2000 (0x54) |
#define | OQPSK2000_STR "OQPSK2000" |
#define | OQPSK200_STR "OQPSK200" |
#define | OQPSK250 (0x33) |
#define | OQPSK250_STR "OQPSK250" |
#define | OQPSK400 (0x95) |
#define | OQPSK400_STR "OQPSK400" |
#define | OQPSK500 (0x94) |
#define | OQPSK500_STR "OQPSK500" |
#define | RATE_NONE (0xFF) |
#define | TRX_INIT_FAIL (1) |
#define | TRX_IRQ_AMI_DI() trx_bit_write(SR_MASK_AMI, 0); |
Disable AMI IRQ. | |
#define | TRX_IRQ_AMI_EI() trx_bit_write(SR_MASK_AMI, 1); |
Enable AMI IRQ. | |
#define | TRX_IRQ_BAT_LOW_DI() trx_bit_write(SR_MASK_BAT_LOW, 0); |
Disable BAT_LOW IRQ. | |
#define | TRX_IRQ_BAT_LOW_EI() trx_bit_write(SR_MASK_BAT_LOW, 1); |
Enable BAT_LOW IRQ. | |
#define | TRX_IRQ_CCA_ED_READY_DI() trx_bit_write(SR_MASK_CCA_ED_READY, 0); |
Disable CCA_ED_READY IRQ. | |
#define | TRX_IRQ_CCA_ED_READY_EI() trx_bit_write(SR_MASK_CCA_ED_READY, 1); |
Enable CCA_ED_READY IRQ. | |
#define | TRX_IRQ_PLL_UNLOCK_DI() trx_bit_write(SR_MASK_PLL_UNLOCK, 0); |
Disable PLL_UNLOCK IRQ. | |
#define | TRX_IRQ_PLL_UNLOCK_EI() trx_bit_write(SR_MASK_PLL_UNLOCK, 1); |
Enable PLL_UNLOCK IRQ. | |
#define | TRX_IRQ_RX_START_DI() trx_bit_write(SR_MASK_RX_START, 0); |
Disable RX_START IRQ. | |
#define | TRX_IRQ_RX_START_EI() trx_bit_write(SR_MASK_RX_START, 1); |
Enable RX_START IRQ. | |
#define | TRX_IRQ_TRX_IRQ_END_DI() trx_bit_write(SR_MASK_TRX_IRQ_END, 0); |
Disable TRX_IRQ_END IRQ. | |
#define | TRX_IRQ_TRX_IRQ_END_EI() trx_bit_write(SR_MASK_TRX_IRQ_END, 1); |
Enable TRX_IRQ_END IRQ. | |
#define | TRX_IRQ_TRX_IRQ_START_DI() trx_bit_write(SR_MASK_TRX_IRQ_START, 0); |
Disable TRX_IRQ_START IRQ. | |
#define | TRX_IRQ_TRX_IRQ_START_EI() trx_bit_write(SR_MASK_TRX_IRQ_START, 1); |
Enable TRX_IRQ_START IRQ. | |
#define | TRX_IRQ_UR_DI() trx_bit_write(SR_MASK_UR, 0); |
Disable TX/RX underun IRQ. | |
#define | TRX_IRQ_UR_EI() trx_bit_write(SR_MASK_UR, 1); |
Enable TX/RX underun IRQ. | |
#define | TRX_NEXT_CHANNEL(x) ((channel_t)(x+1) > TRX_MAX_CHANNEL ? TRX_MAX_CHANNEL : x+1) |
#define | TRX_NEXT_CHANNEL_WRAP(x) ((channel_t)(x+1) > TRX_MAX_CHANNEL ? TRX_MIN_CHANNEL : x+1 ) |
#define | TRX_OK (0) |
#define | TRX_PLL_FAIL (2) |
#define | TRX_PREV_CHANNEL(x) ((channel_t)(x-1) < TRX_MIN_CHANNEL ? TRX_MIN_CHANNEL : x-1) |
#define | TRX_PREV_CHANNEL_WRAP(x) ((channel_t)(x-1) < TRX_MIN_CHANNEL ? TRX_MAX_CHANNEL : x-1 ) |
Typedefs | |
typedef void(* | trx_irq_handler_t )(uint8_t cause) |
typedef uint8_t | trx_ramaddr_t |
typedef uint8_t | trx_regaddr_t |
typedef uint8_t | trx_regval_t |
Enumerations | |
enum | trx_cfg_t { CFG_FLASH, CFG_EEPROM, CFG_NONE } |
Functions | |
trx_regval_t | trx_bit_read (trx_regaddr_t addr, trx_regval_t mask, uint8_t pos) |
subregister read | |
void | trx_bit_write (trx_regaddr_t addr, trx_regval_t mask, uint8_t pos, trx_regval_t value) |
subregister write | |
uint8_t | trx_decode_datarate (uint8_t rhash, char *rstr, uint8_t nlen) |
Decodes a hash value and returns a datarate string pointer. | |
void * | trx_decode_datarate_p (uint8_t rhash) |
Decodes a hash value and returns a datarate string pointer in program memory. | |
uint8_t | trx_frame_get_length (void) |
Get length of a received frame. | |
uint8_t | trx_frame_read (uint8_t *data, uint8_t datasz, uint8_t *lqi) |
Frame Read. | |
uint8_t | trx_frame_read_crc (uint8_t *data, uint8_t datasz, bool *crc_ok) |
Frame Read with CRC check (and crc value kept). | |
uint8_t | trx_frame_read_data_crc (uint8_t *data, uint8_t datasz, uint8_t *lqi, bool *crc_ok) |
Frame Read with CRC check (and crc value suppressed). | |
void | trx_frame_write (uint8_t length, uint8_t *data) |
Frame Write. | |
uint8_t | trx_get_datarate (void) |
get current adjusted data rate. | |
uint8_t | trx_get_datarate_str (uint8_t idx, char *rstr, uint8_t nlen) |
return a copy of a data rate in a buffer. | |
void * | trx_get_datarate_str_p (uint8_t idx) |
return a pointer to a datarate string in the programm memory. | |
uint8_t | trx_get_number_datarates (void) |
return the number of supported data rates. | |
void | trx_io_init (uint8_t spirate) |
SPI Initialization (RADIO_TYPE == AT86RF230). | |
void | trx_parms_get (trx_param_t *p) |
Get static transceiver parameters. | |
uint8_t | trx_parms_set (trx_param_t *p) |
Set static transceiver parameters. | |
uint8_t | trx_reg_read (trx_regaddr_t addr) |
Read Register. | |
void | trx_reg_write (trx_regaddr_t addr, trx_regval_t val) |
Write Register. | |
uint8_t | trx_set_datarate (uint8_t rate_type) |
set data rate | |
void | trx_set_irq_handler (trx_irq_handler_t irqhandler) |
void | trx_sram_read (trx_ramaddr_t addr, uint8_t length, uint8_t *data) |
Read SRAM. | |
void | trx_sram_write (trx_ramaddr_t addr, uint8_t length, uint8_t *data) |
Write SRAM. |
Interface for Transceiver Access Functions.