libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::RingBuffer< T, 0 > Class Template Reference

Detailed Description

template<typename T>
class daisy::RingBuffer< T, 0 >

Utility Ring Buffer imported from pichenettes/stmlib

#include <ringbuffer.h>

Public Member Functions

 RingBuffer ()
 
void Init ()
 
size_t capacity () const
 
size_t writable () const
 
size_t readable () const
 
void Write (T v)
 
void Overwrite (T v)
 
Read ()
 
ImmediateRead ()
 
void Flush ()
 
void ImmediateRead (T *destination, size_t num_elements)
 
void Overwrite (const T *source, size_t num_elements)
 

Constructor & Destructor Documentation

◆ RingBuffer()

template<typename T >
daisy::RingBuffer< T, 0 >::RingBuffer ( )
inline

Member Function Documentation

◆ capacity()

template<typename T >
size_t daisy::RingBuffer< T, 0 >::capacity ( ) const
inline
Returns
0

◆ Flush()

template<typename T >
void daisy::RingBuffer< T, 0 >::Flush ( )
inline

Flush the buffer

◆ ImmediateRead() [1/2]

template<typename T >
T daisy::RingBuffer< T, 0 >::ImmediateRead ( )
inline
Returns
Read value

◆ ImmediateRead() [2/2]

template<typename T >
void daisy::RingBuffer< T, 0 >::ImmediateRead ( T *  destination,
size_t  num_elements 
)
inline
Parameters
destination&
num_elements&

◆ Init()

template<typename T >
void daisy::RingBuffer< T, 0 >::Init ( )
inline

Initialize ringbuffer

◆ Overwrite() [1/2]

template<typename T >
void daisy::RingBuffer< T, 0 >::Overwrite ( const T *  source,
size_t  num_elements 
)
inline
Parameters
source3
num_elements&

◆ Overwrite() [2/2]

template<typename T >
void daisy::RingBuffer< T, 0 >::Overwrite ( v)
inline
Parameters
vValue to overwrite

◆ Read()

template<typename T >
T daisy::RingBuffer< T, 0 >::Read ( )
inline
Returns
Read value

◆ readable()

template<typename T >
size_t daisy::RingBuffer< T, 0 >::readable ( ) const
inline
Returns
0

◆ writable()

template<typename T >
size_t daisy::RingBuffer< T, 0 >::writable ( ) const
inline
Returns
0

◆ Write()

template<typename T >
void daisy::RingBuffer< T, 0 >::Write ( v)
inline
Parameters
vValue to write

The documentation for this class was generated from the following file: