|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
UART driver requirements validator. More...
#include "method_detection.hpp"Go to the source code of this file.
Classes | |
| class | sbl::validation::UartDriverRequirements< UartDriver > |
| UART driver requirements validator. More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs functionality. | |
| namespace | sbl::validation |
| Compile-time validation infrastructure. | |
Variables | |
| template<typename UartDriver > | |
| constexpr bool | sbl::validation::uart_driver_valid = UartDriverRequirements<UartDriver>::validate() |
| Helper to validate a UART driver implementation. | |
UART driver requirements validator.
Validates that UART drivers provide required functionality using the method detection system. This is the core UART contract enforcement for Sound Byte Libs drivers.
Every Sound Byte Libs UART driver MUST implement these methods:
init(const UartHandle&) - Initialize UART with manifest-resolved handleinit_rx(const UartHandle&) - Initialize UART for RX-only (MIDI, sensors)write_byte(uint8_t) - Write single byte (blocking)write(const uint8_t*, size_t) - Write buffer (blocking)write_string(const char*) - Write null-terminated string (blocking)available() -> bool - Check if RX data is availableread_byte() -> uint8_t - Read single byte from RX bufferOptional methods (validated if present):
try_write_byte(uint8_t) -> bool - Non-spinning TX (STM32 only)try_write_string(const char*) -> size_t - Non-spinning TX (STM32 only)Add validation at the bottom of driver uart.hpp:
Definition in file uart_requirements.hpp.