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 (306U)
39 
44 #define AT86RF2XX_RESET_PULSE_WIDTH (62U)
45 
52 #define AT86RF2XX_RESET_DELAY (62U)
53 
62 uint8_t at86rf2xx_reg_read(const at86rf2xx_t *dev, const uint8_t addr);
63 
71 void at86rf2xx_reg_write(const at86rf2xx_t *dev, const uint8_t addr,
72  const uint8_t value);
73 
82 void at86rf2xx_sram_read(const at86rf2xx_t *dev,
83  const uint8_t offset,
84  uint8_t *data,
85  const size_t len);
86 
95 void at86rf2xx_sram_write(const at86rf2xx_t *dev,
96  const uint8_t offset,
97  const uint8_t *data,
98  const size_t len);
99 
108 void at86rf2xx_fb_start(const at86rf2xx_t *dev);
109 
119 void at86rf2xx_fb_read(const at86rf2xx_t *dev,
120  uint8_t *data, const size_t len);
121 
129 void at86rf2xx_fb_stop(const at86rf2xx_t *dev);
130 
138 uint8_t at86rf2xx_get_status(const at86rf2xx_t *dev);
139 
146 
153 
154 
161 
162 #if defined(MODULE_AT86RF233) || defined(MODULE_AT86RF231) || defined(DOXYGEN)
163 
178 void at86rf2xx_get_random(at86rf2xx_t *dev, uint8_t *data, const size_t len);
179 #endif
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* AT86RF2XX_INTERNAL_H */
186 
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:161
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.