Functions


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 Documentation

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


Function Documentation

radio_reg_t trx_bit_read ( sregid_t  sregid  ) 

Read the value from a subregister.

Parameters:
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)
Returns:
value which is read from the sub register.

void trx_bit_write ( sregid_t  sregid,
radio_reg_t  val 
)

Write a value to a subregister.

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

Returns:
length of the received frame

uint8_t trx_frame_read ( uint8_t *  frame  ) 

Read a frame from the radio transceiver.

Return values:
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.
Returns:
length of the downloaded frame (including the LQI byte, if radio is AT86RF230), which is stored as the first element of the array frame.

void trx_frame_write ( uint8_t  length,
uint8_t *  frame 
)

Write a frame to the radio transceiver.

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

Parameters:
val 0 for LOW or 1 for HIGH level of the pin
Returns:
void

void trx_pinset_slptr ( bool  val  ) 

Set the level of the SLP_TR pin.

Parameters:
val 0 for LOW or 1 for HIGH level of the pin
Returns:
void

void trx_pinset_tst ( bool  val  ) 

Set the level of the TST pin.

Parameters:
val 0 for LOW or 1 for HIGH level of the pin
Note:
Not all plattforms support this pin.

radio_reg_t trx_reg_read ( uint8_t  addr  ) 

Read the value from a register.

Parameters:
addr a value or variable of uint8_t, the offset of the register
Returns:
register value

void trx_reg_write ( uint8_t  addr,
radio_reg_t  val 
)

Write a value to a register.

Parameters:
addr a value or variable of uint8_t, the offset of the register
val a variable name of radio_reg_t
Returns:
void

void trx_sram_read ( radio_ram_t  addr,
uint8_t  length,
uint8_t *  data 
)

Read data from SRAM.

Parameters:
addr start address in the SRAM
length number of bytes to be read
Return values:
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.

Parameters:
addr start address in the SRAM
length number of bytes to be written
data pointer to an array of bytes


Generated on Fri Aug 10 16:10:06 2007 for SWPM AT86RF230 Rev. A by  doxygen 1.5.2