Internal interfaces for AT86RF2xx drivers. More...
Internal interfaces for AT86RF2xx drivers.
Definition in file at86rf2xx_internal.h.
Go to the source code of this file.
#define | AT86RF2XX_TXPOWER_MAX (20) |
Max. More... | |
#define | AT86RF2XX_TXPOWER_OFF (17) |
Transmit power offset. | |
#define | AT86RF2XX_WAKEUP_DELAY (306U) |
Transition time from SLEEP to TRX_OFF in us, refer figure 7-4, p.42. More... | |
#define | AT86RF2XX_RESET_PULSE_WIDTH (62U) |
Minimum reset pulse width, refer p.190. More... | |
#define | AT86RF2XX_RESET_DELAY (62U) |
The typical transition time to TRX_OFF after reset pulse is 26 us, refer to figure 7-8, p. More... | |
uint8_t | at86rf2xx_reg_read (const at86rf2xx_t *dev, uint8_t addr) |
Read from a register at address addr from device dev . More... | |
void | at86rf2xx_reg_write (const at86rf2xx_t *dev, uint8_t addr, uint8_t value) |
Write to a register at address addr from device dev . More... | |
void | at86rf2xx_sram_read (const at86rf2xx_t *dev, uint8_t offset, uint8_t *data, size_t len) |
Read a chunk of data from the SRAM of the given device. More... | |
void | at86rf2xx_sram_write (const at86rf2xx_t *dev, uint8_t offset, const uint8_t *data, size_t len) |
Write a chunk of data into the SRAM of the given device. More... | |
void | at86rf2xx_fb_start (const at86rf2xx_t *dev) |
Start a read transcation internal frame buffer of the given device. More... | |
void | at86rf2xx_fb_read (const at86rf2xx_t *dev, uint8_t *data, size_t len) |
Read the internal frame buffer of the given device. More... | |
void | at86rf2xx_fb_stop (const at86rf2xx_t *dev) |
Stop a read transcation internal frame buffer of the given device. More... | |
uint8_t | at86rf2xx_get_status (const at86rf2xx_t *dev) |
Convenience function for reading the status of the given device. More... | |
void | at86rf2xx_assert_awake (at86rf2xx_t *dev) |
Make sure that device is not sleeping. More... | |
void | at86rf2xx_hardware_reset (at86rf2xx_t *dev) |
Trigger a hardware reset. More... | |
void | at86rf2xx_configure_phy (at86rf2xx_t *dev) |
Set PHY parameters based on channel and page number. More... | |
void | at86rf2xx_get_random (const at86rf2xx_t *dev, uint8_t *data, size_t len) |
Read random data from the RNG. More... | |
#define AT86RF2XX_RESET_DELAY (62U) |
The typical transition time to TRX_OFF after reset pulse is 26 us, refer to figure 7-8, p.
Definition at line 79 of file at86rf2xx_internal.h.
#define AT86RF2XX_RESET_PULSE_WIDTH (62U) |
Minimum reset pulse width, refer p.190.
We use 62us so that it is at least one tick on platforms with coarse xtimers
Definition at line 71 of file at86rf2xx_internal.h.
#define AT86RF2XX_TXPOWER_MAX (20) |
#define AT86RF2XX_WAKEUP_DELAY (306U) |
Transition time from SLEEP to TRX_OFF in us, refer figure 7-4, p.42.
For different environments refer figure 13-13, p.201
Definition at line 65 of file at86rf2xx_internal.h.
void at86rf2xx_assert_awake | ( | at86rf2xx_t * | dev | ) |
Make sure that device is not sleeping.
[in,out] | dev | device to eventually wake up |
void at86rf2xx_configure_phy | ( | at86rf2xx_t * | dev | ) |
Set PHY parameters based on channel and page number.
[in,out] | dev | device to configure |
void at86rf2xx_fb_read | ( | const at86rf2xx_t * | dev, |
uint8_t * | data, | ||
size_t | len | ||
) |
Read the internal frame buffer of the given device.
Each read advances the position in the buffer by len
.
[in] | dev | device to read from |
[out] | data | buffer to copy the data to |
[in] | len | number of bytes to read from the frame buffer |
void at86rf2xx_fb_start | ( | const at86rf2xx_t * | dev | ) |
Start a read transcation internal frame buffer of the given device.
Reading the frame buffer returns some extra bytes that are not accessible through reading the RAM directly. This locks the used SPI.
[in] | dev | device to start read |
void at86rf2xx_fb_stop | ( | const at86rf2xx_t * | dev | ) |
Stop a read transcation internal frame buffer of the given device.
Release the SPI device and unlock frame buffer protection.
[in] | dev | device to stop read |
void at86rf2xx_get_random | ( | const at86rf2xx_t * | dev, |
uint8_t * | data, | ||
size_t | len | ||
) |
Read random data from the RNG.
[in] | dev | device to configure |
[out] | data | buffer to copy the random data to |
[in] | len | number of random bytes to store in data |
uint8_t at86rf2xx_get_status | ( | const at86rf2xx_t * | dev | ) |
Convenience function for reading the status of the given device.
[in] | dev | device to read the status from |
void at86rf2xx_hardware_reset | ( | at86rf2xx_t * | dev | ) |
Trigger a hardware reset.
[in,out] | dev | device to reset |
uint8_t at86rf2xx_reg_read | ( | const at86rf2xx_t * | dev, |
uint8_t | addr | ||
) |
Read from a register at address addr
from device dev
.
[in] | dev | device to read from |
[in] | addr | address of the register to read |
void at86rf2xx_reg_write | ( | const at86rf2xx_t * | dev, |
uint8_t | addr, | ||
uint8_t | value | ||
) |
Write to a register at address addr
from device dev
.
[in] | dev | device to write to |
[in] | addr | address of the register to write |
[in] | value | value to write to the given register |
void at86rf2xx_sram_read | ( | const at86rf2xx_t * | dev, |
uint8_t | offset, | ||
uint8_t * | data, | ||
size_t | len | ||
) |
Read a chunk of data from the SRAM of the given device.
[in] | dev | device to read from |
[in] | offset | starting address to read from [valid 0x00-0x7f] |
[out] | data | buffer to read data into |
[in] | len | number of bytes to read from SRAM |
void at86rf2xx_sram_write | ( | const at86rf2xx_t * | dev, |
uint8_t | offset, | ||
const uint8_t * | data, | ||
size_t | len | ||
) |
Write a chunk of data into the SRAM of the given device.
[in] | dev | device to write to |
[in] | offset | address in the SRAM to write to [valid 0x00-0x7f] |
[in] | data | data to copy into SRAM |
[in] | len | number of bytes to write to SRAM |