modm API documentation
modm::platform::UartTxBuffer< SIZE > Class Template Reference
Inheritance diagram for modm::platform::UartTxBuffer< SIZE >:
modm::Uart::TxBuffer modm::atomic::Queue< uint8_t, SIZE >

Public Typedefs

using Index = std::conditional_t< (N >=254), uint16_t, uint8_t >
 
using Size = Index
 

Public Member Functions

const uint8_t & get () const
 
Size getMaxSize () const
 
Size getSize () const
 
bool isEmpty () const
 
bool isFull () const
 
bool isNearlyEmpty () const
 
bool isNearlyFull () const
 
bool isNotEmpty () const
 
bool isNotFull () const
 
void pop ()
 
bool push (const uint8_t &value)
 

Static Public Attributes

static constexpr bool HasTxBuffer = true
 

Member Function Documentation

bool modm::atomic::Queue< uint8_t , N >::isNearlyEmpty ( ) const
inherited

Check if the queue is nearly empty.

Returns
true if less than three elements are stored in the queue, false otherwise.

Only works with queue with more than three elements. TODO: calculations are approximate and may include off-by-one errors.

bool modm::atomic::Queue< uint8_t , N >::isNearlyFull ( ) const
inherited
Returns
false if less than three elements can be stored in queue.

Only works with queue with more than three elements.


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