12#ifndef SBL_COMMON_LOG_DEFAULTS_HPP_
13#define SBL_COMMON_LOG_DEFAULTS_HPP_
15#if __has_include(<sbl/hw/hw.hpp>)
22 static void write(
const char* str) { sbl::driver::Uart<>::write_string(str); }
27struct UartFaultOutput {
28 static void write(
const char* str) { sbl::driver::Uart<>::write_string_polling(str); }
32struct TimerTimestamp {
33 static uint32_t now() {
return sbl::driver::Timer::millis(); }
38#define SBL_LOG_HW_DEFAULTS_AVAILABLE 1
40#define SBL_LOG_HW_DEFAULTS_AVAILABLE 0
44#if defined(SBL_HAS_USB) && __has_include(<sbl/usb/cdc.hpp>)
46#define SBL_LOG_USB_DEFAULTS_AVAILABLE 1
48#define SBL_LOG_USB_DEFAULTS_AVAILABLE 0
USB CDC (Virtual COM Port) interface.
Uber-umbrella header for all target-specific code.
void write(const RgbLed &led, const GpioHandle &r, const GpioHandle &g, const GpioHandle &b)
Write RgbLed state to GPIO pins (bang-bang)