Loading...
Searching...
No Matches
cc2420_internal.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Milan Babel <babel@inf.fu-berlin.de> and INRIA
3 * SPDX-FileCopyrightText: 2015-2016 Freie Universität Berlin
4 * SPDX-FileCopyrightText: 2016 Inria
5 * SPDX-License-Identifier: LGPL-2.1-only
6 */
7
8#pragma once
9
24
25#include <stdint.h>
26
27#include "cc2420.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
36#define CC2420_RESET_DELAY (500U)
37#define CC2420_XOSCON_DELAY (2000U)
38
39uint8_t cc2420_strobe(const cc2420_t *dev, const uint8_t command);
40
49uint16_t cc2420_reg_read(const cc2420_t *dev, const uint8_t addr);
50
58void cc2420_reg_write(const cc2420_t *dev, const uint8_t addr,
59 const uint16_t value);
60
69void cc2420_ram_read(const cc2420_t *dev, const uint16_t addr,
70 uint8_t *data, const size_t len);
71
80void cc2420_ram_write(const cc2420_t *dev, const uint16_t addr,
81 const uint8_t *data, const size_t len);
82
90void cc2420_fifo_read(const cc2420_t *dev, uint8_t *data, const size_t len);
91
99void cc2420_fifo_write(const cc2420_t *dev, uint8_t *data, const size_t len);
100
105
109uint8_t cc2420_state(cc2420_t *dev);
110
115
116#ifdef __cplusplus
117}
118#endif
119
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:88