|
modm API documentation
|
Interrupt save queue. More...
#include <modm/architecture/driver/atomic/queue.hpp>
Public Typedefs | |
| using | Index = std::conditional_t< (N >=254), uint16_t, uint8_t > |
| using | Size = Index |
Public Member Functions | |
| bool | isFull () const |
| bool | isNotFull () const |
| bool | isNearlyFull () const |
| bool | isEmpty () const |
| bool | isNotEmpty () const |
| bool | isNearlyEmpty () const |
| Size | getMaxSize () const |
| Size | getSize () const |
| const T & | get () const |
| bool | push (const T &value) |
| void | pop () |
Interrupt save queue.
A maximum size of 254 is allowed for 8-bit microcontrollers.
| bool modm::atomic::Queue< T, N >::isNearlyEmpty | ( | ) | const |
Check if the queue is nearly empty.
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< T, N >::isNearlyFull | ( | ) | const |
false if less than three elements can be stored in queue.Only works with queue with more than three elements.