Struct hal::serial::read_t
ClassList > hal > serial > read_t
Return type for serial read operations.
#include <serial.hpp>
Public Attributes
Type | Name |
---|---|
size_t | available Number of enqueued and available to be read out bytes. |
size_t | capacity The maximum number of bytes that the serial port can queue up. |
std::span< hal::byte > | data The filled portion of the input buffer from the serial port. |
Public Attributes Documentation
variable available
Number of enqueued and available to be read out bytes.
size_t hal::serial::read_t::available;
This value can be equal to or exceed the value of capacity. In this situation, the number of bytes above the capacity are bytes that have been dropped. Not all drivers will indicate the number of bytes lost. It is up to the driver or application to decide what to do in this situation.
variable capacity
size_t hal::serial::read_t::capacity;
variable data
The filled portion of the input buffer from the serial port.
std::span<hal::byte> hal::serial::read_t::data;
The size of this buffer indicates the number of bytes read The address points to the start of the buffer passed into the read() function.
The documentation for this class was generated from the following file libraries/include/libhal/serial.hpp