cc2538_rf_internal.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 MUTEX NZ Ltd.
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #define CC2538_RX_FIFO_ADDR 0x40088000
23 #define CC2538_TX_FIFO_ADDR 0x40088200
24 
35 uint_fast8_t rfcore_read_byte(void);
36 
48 uint_fast8_t rfcore_peek_rx_fifo(int idx);
49 
56 void rfcore_read_fifo(void *buf, uint_fast8_t len);
57 
63 void rfcore_strobe(uint_fast8_t instr);
64 
70 void rfcore_write_byte(uint_fast8_t byte);
71 
82 void rfcore_poke_tx_fifo(int idx, uint_fast8_t byte);
83 
90 void rfcore_write_fifo(const void *buf, uint_fast8_t len);
91 
92 bool RFCORE_ASSERT_failure(const char *expr, const char *func, int line);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
void rfcore_read_fifo(void *buf, uint_fast8_t len)
Read the remaining unread data from the RX FIFO.
void rfcore_write_byte(uint_fast8_t byte)
Write a single byte to the next index of the TX FIFO.
uint_fast8_t rfcore_read_byte(void)
Read 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.
uint_fast8_t rfcore_peek_rx_fifo(int idx)
Peek a single byte from the RX FIFO.
void rfcore_strobe(uint_fast8_t instr)
Issue a command strobe from the CPU to the radio.
void rfcore_poke_tx_fifo(int idx, uint_fast8_t byte)
Poke a single byte in the TX FIFO.