Update description and debug serial usage

This commit is contained in:
Henrik Stickann
2022-04-12 16:08:00 +02:00
parent b50cf07ce9
commit 9f2c73c9ab
2 changed files with 13 additions and 15 deletions

View File

@@ -17,16 +17,22 @@ namespace sta
} // namespace sta
#ifdef STA_HAL_UART_DEBUG
#ifdef STA_HAL_UART_DEBUG_SERIAL
// Get extern declaration for DebugSerial because const namespace level variables have internal linkage by default
#include <sta/debug_serial.hpp>
#include <usart.h>
namespace sta
{
HalUART DebugSerial(&STA_HAL_UART_DEBUG);
HalUART gHalDebugSerial(&STA_HAL_UART_DEBUG_SERIAL);
// Used by <sta/debug.hpp>
UART * const DebugSerial = &gHalDebugSerial;
} // namespace sta
#endif // STA_HAL_UART_DEBUG
#endif // STA_HAL_UART_DEBUG_SERIAL
#endif // STA_HAL_UART_ENABLE