mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-02 08:41:54 +00:00
Feature: Weak definition of UARThandle getter
This commit is contained in:
parent
93b987e928
commit
70f2ba39e8
@ -48,6 +48,17 @@ namespace sta
|
||||
|
||||
namespace tacos
|
||||
{
|
||||
/**
|
||||
* @brief Function that returns the UART handle used for debugging. Override it in userspace to adjust.
|
||||
*/
|
||||
STA_WEAK
|
||||
UART_HandleTypeDef * getUARThandle(){
|
||||
return &huart1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function that initializes the printable object given by getUARThandle().
|
||||
*/
|
||||
void initPrintable()
|
||||
{
|
||||
// Initialize the mutex for UART communication.
|
||||
@ -55,7 +66,7 @@ namespace sta
|
||||
|
||||
// Initialize the UART interface and printable object.
|
||||
UARTSettings settings = { .mode = UARTMode::RX_TX };
|
||||
STM32UART * intf_ptr = new STM32UART(&huart2, settings, mutex);
|
||||
STM32UART * intf_ptr = new STM32UART(getUARThandle(), settings, mutex);
|
||||
Debug = new PrintableUART(intf_ptr);
|
||||
|
||||
STA_DEBUG_PRINTLN("UART SUCCESSFULLY INITIALIZED");
|
||||
|
Loading…
x
Reference in New Issue
Block a user