cc2420_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Milan Babel <babel@inf.fu-berlin.de> and INRIA
3  * 2015-2016 Freie Universität Berlin
4  * 2016 Inria
5  *
6  * This file is subject to the terms and conditions of the GNU Lesser
7  * General Public License v2.1. See the file LICENSE in the top level
8  * directory for more details.
9  */
10 
25 #ifndef CC2420_INTERNAL_H
26 #define CC2420_INTERNAL_H
27 
28 #include <stdint.h>
29 
30 #include "cc2420.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 #define CC2420_RESET_DELAY (500U)
40 #define CC2420_XOSCON_DELAY (2000U)
41 
42 uint8_t cc2420_strobe(const cc2420_t *dev, const uint8_t command);
43 
52 uint16_t cc2420_reg_read(const cc2420_t *dev, const uint8_t addr);
53 
61 void cc2420_reg_write(const cc2420_t *dev, const uint8_t addr,
62  const uint16_t value);
63 
72 void cc2420_ram_read(const cc2420_t *dev, const uint16_t addr,
73  uint8_t *data, const size_t len);
74 
83 void cc2420_ram_write(const cc2420_t *dev, const uint16_t addr,
84  const uint8_t *data, const size_t len);
85 
93 void cc2420_fifo_read(const cc2420_t *dev, uint8_t *data, const size_t len);
94 
102 void cc2420_fifo_write(const cc2420_t *dev, uint8_t *data, const size_t len);
103 
107 uint8_t cc2420_status(cc2420_t *dev);
108 
112 uint8_t cc2420_state(cc2420_t *dev);
113 
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* CC2420_INTERNAL_H */
Interface definition for the CC2420 driver.
void cc2420_fifo_write(const cc2420_t *dev, uint8_t *data, const size_t len)
Writes FIFO buffer to RAM at address 0x000.
uint8_t cc2420_state(cc2420_t *dev)
Get the device's current state.
void cc2420_ram_read(const cc2420_t *dev, const uint16_t addr, uint8_t *data, const size_t len)
Read a chunk of data from the SRAM of the given device.
void cc2420_reg_write(const cc2420_t *dev, const uint8_t addr, const uint16_t value)
Write to a register at address addr from device dev.
void cc2420_fifo_read(const cc2420_t *dev, uint8_t *data, const size_t len)
Reads FIFO buffer from RAM at address 0x080.
uint8_t cc2420_status(cc2420_t *dev)
Get the device's status byte.
uint16_t cc2420_reg_read(const cc2420_t *dev, const uint8_t addr)
Read from a register at address addr from device dev.
void cc2420_ram_write(const cc2420_t *dev, const uint16_t addr, const uint8_t *data, const size_t len)
Write a chunk of data into the SRAM of the given device.
void cc2420_en_xosc(cc2420_t *dev)
Enable on-board oscillator.
Device descriptor for CC2420 radio devices.
Definition: cc2420.h:89