The friendly Operating System for the Internet of Things
mrf24j40_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Neo Nenaco <neo@nenaco.de>
3  * Copyright (C) 2017 Koen Zandberg <koen@bergzand.net>
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef MRF24J40_INTERNAL_H
22 #define MRF24J40_INTERNAL_H
23 
24 #include <stdint.h>
25 
26 #include "mrf24j40.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
36 void mrf24j40_init(mrf24j40_t *dev);
37 
46 uint8_t mrf24j40_reg_read_short(mrf24j40_t *dev, const uint8_t addr);
47 
55 void mrf24j40_reg_write_short(mrf24j40_t *dev, const uint8_t addr, const uint8_t value);
56 
65 uint8_t mrf24j40_reg_read_long(mrf24j40_t *dev, const uint16_t addr);
66 
74 void mrf24j40_reg_write_long(mrf24j40_t *dev, const uint16_t addr, const uint8_t value);
75 
84 void mrf24j40_tx_normal_fifo_read(mrf24j40_t *dev, const uint16_t offset, uint8_t *data, const size_t len);
85 
94 void mrf24j40_tx_normal_fifo_write(mrf24j40_t *dev, const uint16_t offset, const uint8_t *data, const size_t len);
95 
104 void mrf24j40_rx_fifo_read(mrf24j40_t *dev, const uint16_t offset, uint8_t *data, const size_t len);
105 
114 void mrf24j40_rx_fifo_write(mrf24j40_t *dev, const uint16_t offset, const uint8_t *data, const size_t len);
115 
122 
129 
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* MRF24J40_INTERNAL_H */
142 
void mrf24j40_init(mrf24j40_t *dev)
initialization as decribed in datasheet
void mrf24j40_rx_fifo_write(mrf24j40_t *dev, const uint16_t offset, const uint8_t *data, const size_t len)
Write a chunk of data into the RX_FIFO area of the given device.
void mrf24j40_hardware_reset(mrf24j40_t *dev)
Trigger a hardware reset.
void mrf24j40_tx_normal_fifo_write(mrf24j40_t *dev, const uint16_t offset, const uint8_t *data, const size_t len)
Write a chunk of data into the TX Normal FIFO area of the given device.
Device descriptor for MRF24J40 radio devices.
Definition: mrf24j40.h:143
void mrf24j40_tx_normal_fifo_read(mrf24j40_t *dev, const uint16_t offset, uint8_t *data, const size_t len)
Read a chunk of data from the TX Normal FIFO area of the given device.
uint8_t mrf24j40_reg_read_short(mrf24j40_t *dev, const uint8_t addr)
Read from a register with a at address addr from device dev.
void mrf24j40_reg_write_long(mrf24j40_t *dev, const uint16_t addr, const uint8_t value)
Write to a register at address addr from device dev.
void mrf24j40_update_tasks(mrf24j40_t *dev)
Check for pending interrupts and update task list.
Interface definition for MRF24J40 based drivers.
void mrf24j40_reset_tasks(mrf24j40_t *dev)
Reset the pending task list of a device.
void mrf24j40_rx_fifo_read(mrf24j40_t *dev, const uint16_t offset, uint8_t *data, const size_t len)
Read a chunk of data from the RX_FIFO area of the given device.
void mrf24j40_reg_write_short(mrf24j40_t *dev, const uint8_t addr, const uint8_t value)
Write to a register at address addr from device dev.
uint8_t mrf24j40_reg_read_long(mrf24j40_t *dev, const uint16_t addr)
Read from a register with a at address addr from device dev.