nRF51 SDK: app_fifo_t Struct Reference

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

- Data Structures
- Data Structure Index
- Data Fields

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Fields
app_fifo_t Struct Reference
FIFO implementation

A FIFO instance structure. Keeps track of which bytes to read and write next. Also it keeps the information about which memory is allocated for the buffer and its size. This needs to be initialized by app_fifo_init() before use. More...

`#include <app_fifo.h>`

## Data Fields

uint8_t * | p_buf
uint16_t | buf_size_mask
volatile uint32_t | read_pos
volatile uint32_t | write_pos

## Detailed Description

A FIFO instance structure. Keeps track of which bytes to read and write next. Also it keeps the information about which memory is allocated for the buffer and its size. This needs to be initialized by app_fifo_init() before use.

## Field Documentation

uint16_t app_fifo_t::buf_size_mask

Read/write index mask. Also used for size checking.

uint8_t* app_fifo_t::p_buf

Pointer to FIFO buffer memory.

volatile uint32_t app_fifo_t::read_pos

Next read position in the FIFO buffer.

volatile uint32_t app_fifo_t::write_pos

Next write position in the FIFO buffer.