CRTP adapter that turns a BaseUart& into a transport the alicat_basis2::Driver can drive.
More...
#include <AlicatBasis2Handler.h>
|
| | HalUartAlicatBasis2Comm (BaseUart &uart) noexcept |
| |
| void | write (const std::uint8_t *data, std::size_t length) noexcept |
| |
| std::size_t | read (std::uint8_t *out, std::size_t max, std::uint32_t timeout_ms) noexcept |
| |
| void | flush_rx () noexcept |
| |
| void | delay_ms_impl (std::uint32_t ms) noexcept |
| |
CRTP adapter that turns a BaseUart& into a transport the alicat_basis2::Driver can drive.
- Notes
BaseUart::Read returns an error code, not a byte count, so we trust the contract that the underlying driver fulfills the request completely or returns a non-success error (timeout / no data).
delay_ms_impl uses vTaskDelay so the driver can satisfy the Modbus-RTU 3.5-character idle gap when needed.
◆ HalUartAlicatBasis2Comm()
| HalUartAlicatBasis2Comm::HalUartAlicatBasis2Comm |
( |
BaseUart & |
uart | ) |
|
|
inlineexplicitnoexcept |
◆ delay_ms_impl()
| void HalUartAlicatBasis2Comm::delay_ms_impl |
( |
std::uint32_t |
ms | ) |
|
|
noexcept |
◆ flush_rx()
| void HalUartAlicatBasis2Comm::flush_rx |
( |
| ) |
|
|
noexcept |
◆ read()
| std::size_t HalUartAlicatBasis2Comm::read |
( |
std::uint8_t * |
out, |
|
|
std::size_t |
max, |
|
|
std::uint32_t |
timeout_ms |
|
) |
| |
|
noexcept |
◆ write()
| void HalUartAlicatBasis2Comm::write |
( |
const std::uint8_t * |
data, |
|
|
std::size_t |
length |
|
) |
| |
|
noexcept |
◆ uart_
| BaseUart& HalUartAlicatBasis2Comm::uart_ |
|
private |
The documentation for this class was generated from the following files: