Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
driver.hpp File Reference

UART driver interface: baud-rate constants for MCU UART drivers. More...

Detailed Description

UART driver interface: baud-rate constants for MCU UART drivers.

MCU UART drivers implement this static interface, which uart_requirements.hpp checks at compile time:

static void init(const sbl::UartHandle& handle); // or bool
static void init_rx(const sbl::UartHandle& handle); // or bool
static void write_byte(uint8_t byte);
static void write(const uint8_t* data, size_t len);
static void write_string(const char* str);
static bool available();
static uint8_t read_byte();
UART peripheral handle.
Definition handle.hpp:27

Optional: try_write_byte(uint8_t) -> bool and try_write_string(const char*) -> size_t, which do not spin on a full TX path.

Definition in file driver.hpp.

#include <cstdint>
#include <cstddef>

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::uart
 Standard baud rates for UART communication.
 

Variables

constexpr uint32_t sbl::uart::BAUD_9600 = 9600
 
constexpr uint32_t sbl::uart::BAUD_19200 = 19200
 
constexpr uint32_t sbl::uart::BAUD_38400 = 38400
 
constexpr uint32_t sbl::uart::BAUD_57600 = 57600
 
constexpr uint32_t sbl::uart::BAUD_115200 = 115200
 
constexpr uint32_t sbl::uart::BAUD_230400 = 230400
 
constexpr uint32_t sbl::uart::BAUD_460800 = 460800
 
constexpr uint32_t sbl::uart::BAUD_921600 = 921600
 
constexpr uint32_t sbl::uart::BAUD_MIDI = 31250