iSensor-SPI-Buffer  1.15
Firmware for the iSensor-SPI-Buffer board to enable full throughput buffered data capture on Analog Devices IMUs
buffer.h
Go to the documentation of this file.
1 
11 #ifndef INC_BUFFER_H_
12 #define INC_BUFFER_H_
13 
14 /* Header includes require for prototypes */
15 #include <stdint.h>
16 
17 /* Public function prototypes */
18 
19 /* @cond DOXYGEN_IGNORE */
20 void Buffer_Reset();
21 uint8_t* Buffer_Take_Element();
22 uint8_t* Buffer_Add_Element();
23 uint32_t Buffer_Can_Add_Element();
24 /* @endcond */
25 
27 #define BUF_SIZE 0xA000
28 
30 #define BUF_MIN_ENTRY 2
31 
33 #define BUF_MAX_ENTRY 64
34 
35 /* Public variables exported from module */
36 extern uint32_t g_bufLastRegIndex;
37 extern uint32_t g_bufCount;
38 extern uint32_t g_bufNumWords32;
39 
40 #endif /* INC_BUFFER_H_ */
buf_increment
static uint32_t buf_increment
Definition: buffer.c:34
reg.h
Header file for iSensor-SPI-Buffer register interfacing module.
buf_lastEntryIndex
static uint32_t buf_lastEntryIndex
Definition: buffer.c:43
buf_maxCount
static uint32_t buf_maxCount
Definition: buffer.c:40
buf_tail
static volatile uint32_t buf_tail
Definition: buffer.c:31
g_bufCount
uint32_t g_bufCount
Definition: buffer.c:19
BUF_SIZE
#define BUF_SIZE
Definition: buffer.h:27
BUF_MAX_ENTRY
#define BUF_MAX_ENTRY
Definition: buffer.h:33
Buffer_Add_Element
uint8_t * Buffer_Add_Element()
Add an element to the buffer.
Definition: buffer.c:133
Buffer_Can_Add_Element
uint32_t Buffer_Can_Add_Element()
Checks if an element can be added to the buffer.
Definition: buffer.c:52
g_bufCount
uint32_t g_bufCount
Definition: buffer.c:19
g_bufLastRegIndex
uint32_t g_bufLastRegIndex
Definition: buffer.c:16
g_bufNumWords32
uint32_t g_bufNumWords32
Definition: buffer.c:22
buffer.h
Header file for iSensor-SPI-Buffer buffer data structure module.
buf_head
static volatile uint32_t buf_head
Definition: buffer.c:28
buf_replaceOldest
static uint32_t buf_replaceOldest
Definition: buffer.c:37
g_bufNumWords32
uint32_t g_bufNumWords32
Definition: buffer.c:22
__attribute__
static uint8_t buf[BUF_SIZE] __attribute__((aligned(32)))
Buffer_Take_Element
uint8_t * Buffer_Take_Element()
Take a single element from the buffer.
Definition: buffer.c:81
BUF_MIN_ENTRY
#define BUF_MIN_ENTRY
Definition: buffer.h:30
Buffer_Reset
void Buffer_Reset()
Clears the buffer data structure.
Definition: buffer.c:186
g_bufLastRegIndex
uint32_t g_bufLastRegIndex
Definition: buffer.c:16