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  * 2017 HAW Hamburg
5  *
6  * This file is subject to the terms and conditions of the GNU Lesser General
7  * Public License v2.1. See the file LICENSE in the top level directory for more
8  * details.
9  */
10 
24 #ifndef AT86RF2XX_INTERNAL_H
25 #define AT86RF2XX_INTERNAL_H
26 
27 #include <stdint.h>
28 
29 #include "at86rf2xx.h"
30 
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 #ifdef MODULE_AT86RF212B
40 #define AT86RF2XX_TXPOWER_MAX (36)
41 #elif MODULE_AT86RF233
42 #define AT86RF2XX_TXPOWER_MAX (21)
43 #else
44 #define AT86RF2XX_TXPOWER_MAX (20)
45 #endif
46 
50 #ifdef MODULE_AT86RF212B
51 #define AT86RF2XX_TXPOWER_OFF (25)
52 #else
53 #define AT86RF2XX_TXPOWER_OFF (17)
54 #endif
55 
60 #define AT86RF2XX_WAKEUP_DELAY (306U)
61 
66 #define AT86RF2XX_RESET_PULSE_WIDTH (62U)
67 
74 #define AT86RF2XX_RESET_DELAY (62U)
75 
84 uint8_t at86rf2xx_reg_read(const at86rf2xx_t *dev, uint8_t addr);
85 
93 void at86rf2xx_reg_write(const at86rf2xx_t *dev, uint8_t addr, uint8_t value);
94 
103 void at86rf2xx_sram_read(const at86rf2xx_t *dev, uint8_t offset,
104  uint8_t *data, size_t len);
105 
114 void at86rf2xx_sram_write(const at86rf2xx_t *dev, uint8_t offset,
115  const uint8_t *data, size_t len);
116 
125 void at86rf2xx_fb_start(const at86rf2xx_t *dev);
126 
136 void at86rf2xx_fb_read(const at86rf2xx_t *dev, uint8_t *data, size_t len);
137 
145 void at86rf2xx_fb_stop(const at86rf2xx_t *dev);
146 
154 uint8_t at86rf2xx_get_status(const at86rf2xx_t *dev);
155 
162 
169 
170 
177 
178 #if defined(MODULE_AT86RF233) || defined(MODULE_AT86RF231) || defined(DOXYGEN)
179 
194 void at86rf2xx_get_random(const at86rf2xx_t *dev, uint8_t *data, size_t len);
195 #endif
196 
197 #ifdef __cplusplus
198 }
199 #endif
200 
201 #endif /* AT86RF2XX_INTERNAL_H */
202 
void at86rf2xx_fb_stop(const at86rf2xx_t *dev)
Stop a read transcation internal frame buffer of the given device.
Interface definition for AT86RF2xx based drivers.
void at86rf2xx_reg_write(const at86rf2xx_t *dev, uint8_t addr, uint8_t value)
Write to a register at address addr from device dev.
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.
uint8_t at86rf2xx_reg_read(const at86rf2xx_t *dev, uint8_t addr)
Read from a register at address addr from device dev.
void at86rf2xx_fb_read(const at86rf2xx_t *dev, uint8_t *data, size_t len)
Read the internal frame buffer of the given device.
void at86rf2xx_get_random(const at86rf2xx_t *dev, uint8_t *data, size_t len)
Read random data from the RNG.
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.
Device descriptor for AT86RF2XX radio devices.
Definition: at86rf2xx.h:175
void at86rf2xx_hardware_reset(at86rf2xx_t *dev)
Trigger a hardware reset.
void at86rf2xx_assert_awake(at86rf2xx_t *dev)
Make sure that device is not sleeping.
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.
void at86rf2xx_fb_start(const at86rf2xx_t *dev)
Start a read transcation internal frame buffer of the given device.