sta-core/src/debug_serial.cpp
2023-02-02 22:22:14 +01:00

31 lines
566 B
C++

#include <sta/debug_serial.hpp>
#ifdef STA_DEBUG_SERIAL_ENABLED
#ifdef STA_PLATFORM_STM32
#include <sta/stm32/uart.hpp>
#include <usart.h>
// Set platform UART alias
using PlatformUART = sta::STM32UART;
#endif // STA_PLATFORM_STM32
namespace
{
// Create platform specific serial interface
PlatformUART platformDebugSerial(&STA_DEBUG_SERIAL_UART);
}
namespace sta
{
// Create debug serial object using platform specific serial interface
PrintableUART DebugSerial(&platformDebugSerial);
} // namespace sta
#endif // STA_DEBUG_SERIAL_ENABLED