cc2538_rf_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 MUTEX NZ Ltd.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  *
8  */
9 
20 #ifndef CC2538_RF_INTERNAL_H
21 #define CC2538_RF_INTERNAL_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #define CC2538_RX_FIFO_ADDR 0x40088000
28 #define CC2538_TX_FIFO_ADDR 0x40088200
29 
40 uint_fast8_t rfcore_read_byte(void);
41 
53 uint_fast8_t rfcore_peek_rx_fifo(int idx);
54 
61 void rfcore_read_fifo(void *buf, uint_fast8_t len);
62 
68 void rfcore_strobe(uint_fast8_t instr);
69 
75 void rfcore_write_byte(uint_fast8_t byte);
76 
87 void rfcore_poke_tx_fifo(int idx, uint_fast8_t byte);
88 
95 void rfcore_write_fifo(const void *buf, uint_fast8_t len);
96 
97 bool RFCORE_ASSERT_failure(const char *expr, const char *func, int line);
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* CC2538_RF_INTERNAL_H */
104 
void rfcore_poke_tx_fifo(int idx, uint_fast8_t byte)
Poke a single byte in the TX FIFO.
uint_fast8_t rfcore_peek_rx_fifo(int idx)
Peek a single byte from the RX FIFO.
void rfcore_write_fifo(const void *buf, uint_fast8_t len)
Write a string of bytes to the TX FIFO.
void rfcore_read_fifo(void *buf, uint_fast8_t len)
Read the remaining unread data from the RX FIFO.
void rfcore_strobe(uint_fast8_t instr)
Issue a command strobe from the CPU to the radio.
uint_fast8_t rfcore_read_byte(void)
Read a single byte from the RX FIFO.
void rfcore_write_byte(uint_fast8_t byte)
Write a single byte to the next index of the TX FIFO.