OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
BitQueue Class Reference

Queue for 61 bits. More...

#include <InternalTypes.hpp>

Public Member Functions

void enqueue (bool value)
 Push a bit into the queue.
 
bool dequeue (bool &value)
 Extract a bit from the queue.
 

Detailed Description

Queue for 61 bits.

Note
This is thread-safe as long as there is just one thread calling enqueue() and just one thread calling dequeue()

Definition at line 319 of file InternalTypes.hpp.

Member Function Documentation

◆ dequeue()

bool BitQueue::dequeue ( bool & value)
inline

Extract a bit from the queue.

Parameters
[out]valueThe extracted bit, if any
Returns
true if the queue was not empty, so value contains valid data.
false if the queue was empty, so value was not written.

Definition at line 350 of file InternalTypes.hpp.

◆ enqueue()

void BitQueue::enqueue ( bool value)
inline

Push a bit into the queue.

Note
In case of overflow, value is discarded.
Parameters
valueTrue to push 1, false to push 0.

Definition at line 328 of file InternalTypes.hpp.


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