PIDUINO
Loading...
Searching...
No Matches
Piduino::Fifo

#include <fifo.h>

Collaboration diagram for Piduino::Fifo:

Public Member Functions

 Fifo (uint16_t max)
 
 ~Fifo ()
 
void clear ()
 
uint16_t length () const
 
uint16_t free () const
 
uint16_t size () const
 
uint8_t * data () const
 
uint8_t * in () const
 
uint8_t * out () const
 
uint16_t pull (uint8_t *buf, uint16_t max)
 
int pull ()
 
uint16_t push (const uint8_t *buf, uint16_t len)
 
int push (uint8_t b)
 
void seek (uint16_t len)
 

Protected Attributes

uint8_t * _data
 
uint16_t _size
 
uint8_t * _in
 
uint8_t * _out
 

Detailed Description

Definition at line 27 of file fifo.h.

Constructor & Destructor Documentation

◆ Fifo()

Piduino::Fifo::Fifo ( uint16_t  max)
inline

Definition at line 30 of file fifo.h.

◆ ~Fifo()

Piduino::Fifo::~Fifo ( )
inline

Definition at line 32 of file fifo.h.

References _data.

Member Function Documentation

◆ clear()

void Piduino::Fifo::clear ( )
inline

Definition at line 37 of file fifo.h.

References _data, _in, and _out.

◆ data()

uint8_t * Piduino::Fifo::data ( ) const
inline

Definition at line 57 of file fifo.h.

References _data.

◆ free()

uint16_t Piduino::Fifo::free ( ) const
inline

Definition at line 47 of file fifo.h.

References _size, and length().

Referenced by push(), and push().

Here is the call graph for this function:

◆ in()

uint8_t * Piduino::Fifo::in ( ) const
inline

Definition at line 62 of file fifo.h.

References _in.

◆ length()

uint16_t Piduino::Fifo::length ( ) const
inline

Definition at line 42 of file fifo.h.

References _in, _out, and _size.

Referenced by free(), pull(), and pull().

◆ out()

uint8_t * Piduino::Fifo::out ( ) const
inline

Definition at line 67 of file fifo.h.

References _out.

◆ pull() [1/2]

int Piduino::Fifo::pull ( )
inline

Definition at line 80 of file fifo.h.

References _out, and length().

Here is the call graph for this function:

◆ pull() [2/2]

uint16_t Piduino::Fifo::pull ( uint8_t *  buf,
uint16_t  max 
)
inline

Definition at line 72 of file fifo.h.

References _out, and length().

Here is the call graph for this function:

◆ push() [1/2]

uint16_t Piduino::Fifo::push ( const uint8_t *  buf,
uint16_t  len 
)
inline

Definition at line 88 of file fifo.h.

References _in, and free().

Here is the call graph for this function:

◆ push() [2/2]

int Piduino::Fifo::push ( uint8_t  b)
inline

Definition at line 96 of file fifo.h.

References _in, and free().

Here is the call graph for this function:

◆ seek()

void Piduino::Fifo::seek ( uint16_t  len)
inline

Definition at line 104 of file fifo.h.

References _data, _in, _out, and _size.

◆ size()

uint16_t Piduino::Fifo::size ( ) const
inline

Definition at line 52 of file fifo.h.

References _size.

Member Data Documentation

◆ _data

uint8_t* Piduino::Fifo::_data
protected

Definition at line 111 of file fifo.h.

Referenced by clear(), data(), seek(), and ~Fifo().

◆ _in

uint8_t* Piduino::Fifo::_in
protected

Definition at line 113 of file fifo.h.

Referenced by clear(), in(), length(), push(), push(), and seek().

◆ _out

uint8_t* Piduino::Fifo::_out
protected

Definition at line 114 of file fifo.h.

Referenced by clear(), length(), out(), pull(), pull(), and seek().

◆ _size

uint16_t Piduino::Fifo::_size
protected

Definition at line 112 of file fifo.h.

Referenced by free(), length(), seek(), and size().