modm API documentation
modm::platform::UartRxBuffer< SIZE > Class Template Reference

#include <modm/platform/uart/uart_buffer.hpp>

Inheritance diagram for modm::platform::UartRxBuffer< SIZE >:
modm::Uart::RxBuffer 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 HasRxBuffer = true
 

Detailed Description

template<size_t SIZE>
class modm::platform::UartRxBuffer< SIZE >

Universal asynchronous receiver transmitter (implementation based on modm::atomic::Queue)

Author
Kevin Laeufer
Niklas Hauser
Dima Barsky

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: