at86rf2xx_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Alaeddine Weslati <alaeddine.weslati@inria.fr>
3  * Copyright (C) 2015 Freie Universit├Ąt Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
22 #ifndef AT86RF2XX_INTERNAL_H
23 #define AT86RF2XX_INTERNAL_H
24 
25 #include <stdint.h>
26 
27 #include "at86rf2xx.h"
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 #define AT86RF2XX_WAKEUP_DELAY (300U)
39 
43 #define AT86RF2XX_RESET_PULSE_WIDTH (1U)
44 
49 #define AT86RF2XX_RESET_DELAY (26U)
50 
59 uint8_t at86rf2xx_reg_read(const at86rf2xx_t *dev, const uint8_t addr);
60 
68 void at86rf2xx_reg_write(const at86rf2xx_t *dev, const uint8_t addr,
69  const uint8_t value);
70 
79 void at86rf2xx_sram_read(const at86rf2xx_t *dev,
80  const uint8_t offset,
81  uint8_t *data,
82  const size_t len);
83 
92 void at86rf2xx_sram_write(const at86rf2xx_t *dev,
93  const uint8_t offset,
94  const uint8_t *data,
95  const size_t len);
96 
105 void at86rf2xx_fb_start(const at86rf2xx_t *dev);
106 
116 void at86rf2xx_fb_read(const at86rf2xx_t *dev,
117  uint8_t *data, const size_t len);
118 
126 void at86rf2xx_fb_stop(const at86rf2xx_t *dev);
127 
135 uint8_t at86rf2xx_get_status(const at86rf2xx_t *dev);
136 
143 
150 
151 
158 
159 #if defined(MODULE_AT86RF233) || defined(MODULE_AT86RF231) || defined(DOXYGEN)
160 
175 void at86rf2xx_get_random(at86rf2xx_t *dev, uint8_t *data, const size_t len);
176 #endif
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif /* AT86RF2XX_INTERNAL_H */
183 
void at86rf2xx_fb_stop(const at86rf2xx_t *dev)
Stop a read transcation internal frame buffer of the given device.
void at86rf2xx_reg_write(const at86rf2xx_t *dev, const uint8_t addr, const uint8_t value)
Write to a register at address addr from device dev.
Interface definition for AT86RF2xx based drivers.
void at86rf2xx_fb_read(const at86rf2xx_t *dev, uint8_t *data, const size_t len)
Read the internal frame buffer of the given device.
uint8_t at86rf2xx_get_status(const at86rf2xx_t *dev)
Convenience function for reading the status of the given device.
void at86rf2xx_configure_phy(at86rf2xx_t *dev)
Set PHY parameters based on channel and page number.
void at86rf2xx_get_random(at86rf2xx_t *dev, uint8_t *data, const size_t len)
Read random data from the RNG.
void at86rf2xx_sram_write(const at86rf2xx_t *dev, const uint8_t offset, const uint8_t *data, const size_t len)
Write a chunk of data into the SRAM of the given device.
Device descriptor for AT86RF2XX radio devices.
Definition: at86rf2xx.h:157
void at86rf2xx_hardware_reset(at86rf2xx_t *dev)
Trigger a hardware reset.
uint8_t at86rf2xx_reg_read(const at86rf2xx_t *dev, const uint8_t addr)
Read from a register at address addr from device dev.
void at86rf2xx_sram_read(const at86rf2xx_t *dev, const uint8_t offset, uint8_t *data, const size_t len)
Read a chunk of data from the SRAM of the given device.
void at86rf2xx_assert_awake(at86rf2xx_t *dev)
Make sure that device is not sleeping.
void at86rf2xx_fb_start(const at86rf2xx_t *dev)
Start a read transcation internal frame buffer of the given device.