Expose console over serial port for H7 proc (#3578)

This way you can use the console/TunerStudio with the ST-Link

In the process, combine TS_PRIMARY_UART and TS_PRIMARY_SERIAL into TS_PRIMARY_PORT, to make UART vs
SERIAL selection more robus.  Ditto for TS_SECONDARY_*.  Also change use of TS_NO_PRIMARY to be #if
not #ifdef, so that it can be properly set as a compile flag and not be overwritten by various
header files.
This commit is contained in:
Scott Smith 2021-11-19 21:39:08 -08:00 committed by GitHub
parent fcc2b780e9
commit 1fe26f55fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 76 additions and 60 deletions

View File

@ -7,7 +7,7 @@
#include "dfu.h" #include "dfu.h"
// Communication vars // Communication vars
static UartTsChannel blTsChannel(TS_PRIMARY_UART); static UartTsChannel blTsChannel(TS_PRIMARY_PORT);
static uint8_t buffer[DFU_BUFFER_SIZE]; static uint8_t buffer[DFU_BUFFER_SIZE];
// Use short timeout for the first data packet, and normal timeout for the rest // Use short timeout for the first data packet, and normal timeout for the rest
static int sr5Timeout = DFU_SR5_TIMEOUT_FIRST; static int sr5Timeout = DFU_SR5_TIMEOUT_FIRST;

View File

@ -11,7 +11,7 @@ DDEFS += -DFIRMWARE_ID=\"atlas\" -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS
# DEFS += -DEFI_SOFTWARE_KNOCK=TRUE # DEFS += -DEFI_SOFTWARE_KNOCK=TRUE
# disable hardware serial ports on H7 # disable hardware serial ports on H7
# DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY # DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# We are running on Atlas hardware! # We are running on Atlas hardware!
DDEFS += -DHW_ATLAS=1 DDEFS += -DHW_ATLAS=1

View File

@ -279,16 +279,13 @@
*/ */
#define EFI_USE_UART_DMA FALSE #define EFI_USE_UART_DMA FALSE
#undef TS_SECONDARY_UART
#undef TS_SECONDARY_SERIAL
// todo: add CAN support // todo: add CAN support
//#define TS_CAN_DEVICE CAND1 //#define TS_CAN_DEVICE CAND1
#define TS_CAN_AF PAL_MODE_ALTERNATIVE_CAN #define TS_CAN_AF PAL_MODE_ALTERNATIVE_CAN
#define TS_CAN_DEVICE_SHORT_PACKETS_IN_ONE_FRAME #define TS_CAN_DEVICE_SHORT_PACKETS_IN_ONE_FRAME
#undef TS_PRIMARY_SERIAL #undef TS_PRIMARY_PORT
#undef TS_PRIMARY_UART #undef TS_SECONDARY_PORT
#define EFI_USB_SERIAL TRUE #define EFI_USB_SERIAL TRUE
#define EFI_CONSOLE_USB_DEVICE SDU1 #define EFI_CONSOLE_USB_DEVICE SDU1

View File

@ -31,7 +31,7 @@ DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE
DDEFS += -DEFI_LOGIC_ANALYZER=FALSE DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
# Enable serial pins on expansion header # Enable serial pins on expansion header
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_6 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_5 -DTS_PRIMARY_UART=UARTD2 -DSTM32_UART_USE_USART2=1 DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_6 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_5 -DTS_PRIMARY_PORT=UARTD2 -DSTM32_UART_USE_USART2=1
# We are running on Hellen-One hardware! # We are running on Hellen-One hardware!
DDEFS += -DHW_HELLEN=1 DDEFS += -DHW_HELLEN=1

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen121nissan\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen121nissan\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen121vag\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen121vag\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen128\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen128\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen154hyundai\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen154hyundai\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellenNA6\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellenNA6\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -25,7 +25,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen81\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen81\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -22,7 +22,7 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card # Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen88bmw\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen88bmw\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)

View File

@ -268,8 +268,8 @@
*/ */
#define EFI_USE_UART_DMA FALSE #define EFI_USE_UART_DMA FALSE
#define TS_PRIMARY_UART UARTD2 #define TS_PRIMARY_PORT UARTD2
#undef TS_SECONDARY_UART #undef TS_SECONDARY_PORT
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_10 #define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_10
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_11 #define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_11
@ -360,7 +360,7 @@
if (__debugEnabled) { \ if (__debugEnabled) { \
extern char __debugBuffer[80]; \ extern char __debugBuffer[80]; \
chsnprintf(__debugBuffer, sizeof(__debugBuffer), fmt, ##__VA_ARGS__); \ chsnprintf(__debugBuffer, sizeof(__debugBuffer), fmt, ##__VA_ARGS__); \
uart_lld_blocking_send(TS_PRIMARY_UART, strlen(__debugBuffer), (void *)__debugBuffer); \ uart_lld_blocking_send(TS_PRIMARY_PORT, strlen(__debugBuffer), (void *)__debugBuffer); \
} \ } \
} }

View File

@ -1,5 +1,11 @@
# List of all the board related files. # List of all the board related files.
DDEFS = -DTS_NO_PRIMARY=0 \
-DTS_PRIMARY_PORT=SD3 \
-DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_8 \
-DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_9 \
# Shared variables # Shared variables
ALLCPPSRC += $(PROJECT_DIR)/config/boards/nucleo_h743/board_configuration.cpp ALLCPPSRC += $(PROJECT_DIR)/config/boards/nucleo_h743/board_configuration.cpp

View File

@ -34,15 +34,13 @@
#define ADC_CHANNEL_VREF ADC_CHANNEL_IN14 #define ADC_CHANNEL_VREF ADC_CHANNEL_IN14
#undef TS_PRIMARY_SERIAL #undef TS_PRIMARY_PORT
#undef TS_PRIMARY_UART #define TS_PRIMARY_PORT UARTD4
#define TS_PRIMARY_UART UARTD4
#undef EFI_UART_GPS #undef EFI_UART_GPS
#define EFI_UART_GPS FALSE #define EFI_UART_GPS FALSE
#undef TS_SECONDARY_UART #undef TS_SECONDARY_PORT
#undef TS_SECONDARY_SERIAL
#undef EFI_BLUETOOTH_SETUP #undef EFI_BLUETOOTH_SETUP
#define EFI_BLUETOOTH_SETUP TRUE #define EFI_BLUETOOTH_SETUP TRUE

View File

@ -32,7 +32,7 @@ endif
ifeq ($(PROJECT_CPU),ARCH_STM32F4) ifeq ($(PROJECT_CPU),ARCH_STM32F4)
# Hardware serial port on UART 2 -> PD5/PD6 # Hardware serial port on UART 2 -> PD5/PD6
DDEFS += -DSTM32_UART_USE_USART2=TRUE DDEFS += -DSTM32_UART_USE_USART2=TRUE
DDEFS += -DTS_PRIMARY_UART=UARTD2 DDEFS += -DTS_PRIMARY_PORT=UARTD2
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_5 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_6 DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_5 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_6
endif endif

View File

@ -21,13 +21,11 @@
#define LED_RUNING_BRAIN_PIN_MODE INVERTED_OUTPUT #define LED_RUNING_BRAIN_PIN_MODE INVERTED_OUTPUT
/* debug console */ /* debug console */
#undef TS_PRIMARY_SERIAL #undef TS_PRIMARY_PORT
#undef TS_PRIMARY_UART #define TS_PRIMARY_PORT SD1
#define TS_PRIMARY_SERIAL SD1
// no secondary channel // no secondary channel
#undef TS_SECONDARY_UART #undef TS_SECONDARY_PORT
#undef TS_SECONDARY_SERIAL
/* Knock detection */ /* Knock detection */
#undef EFI_HIP_9011 #undef EFI_HIP_9011
@ -94,7 +92,7 @@
#undef SERIAL_SPEED #undef SERIAL_SPEED
#define SERIAL_SPEED 115200 #define SERIAL_SPEED 115200
#ifdef TS_PRIMARY_SERIAL #ifdef TS_PRIMARY_PORT
#undef EFI_CONSOLE_TX_PORT #undef EFI_CONSOLE_TX_PORT
#define EFI_CONSOLE_TX_PORT GPIOA #define EFI_CONSOLE_TX_PORT GPIOA
#undef EFI_CONSOLE_TX_PIN #undef EFI_CONSOLE_TX_PIN

View File

@ -360,11 +360,11 @@
#define EFI_USE_UART_DMA TRUE #define EFI_USE_UART_DMA TRUE
#endif #endif
#ifndef TS_PRIMARY_UART #ifndef TS_PRIMARY_PORT
#define TS_PRIMARY_UART UARTD3 #define TS_PRIMARY_PORT UARTD3
#endif #endif
#undef TS_SECONDARY_UART #undef TS_SECONDARY_PORT
#define AUX_SERIAL_DEVICE (&SD6) #define AUX_SERIAL_DEVICE (&SD6)

View File

@ -37,8 +37,10 @@
#define EFI_USE_UART_DMA FALSE #define EFI_USE_UART_DMA FALSE
// UART driver not implemented on F7 // UART driver not implemented on F7
#define TS_NO_PRIMARY #ifndef TS_NO_PRIMARY
#define TS_NO_SECONDARY #define TS_NO_PRIMARY 1
#endif
#define TS_NO_SECONDARY 1
#define AUX_SERIAL_DEVICE (&SD6) #define AUX_SERIAL_DEVICE (&SD6)

View File

@ -9,13 +9,13 @@
#pragma once #pragma once
#include "global.h" #include "global.h"
#if (!defined(TS_NO_PRIMARY) && (defined(TS_PRIMARY_UART) || defined(TS_PRIMARY_SERIAL))) #if (!TS_NO_PRIMARY && defined(TS_PRIMARY_PORT))
#define HAS_PRIMARY true #define HAS_PRIMARY true
#else #else
#define HAS_PRIMARY false #define HAS_PRIMARY false
#endif #endif
#if (!defined(TS_NO_SECONDARY) && (defined(TS_SECONDARY_UART) || defined(TS_SECONDARY_SERIAL))) #if (!TS_NO_SECONDARY && defined(TS_SECONDARY_PORT))
#define HAS_SECONDARY true #define HAS_SECONDARY true
#else #else
#define HAS_SECONDARY false #define HAS_SECONDARY false

View File

@ -11,16 +11,29 @@
#include "tunerstudio_io.h" #include "tunerstudio_io.h"
#include "connector_uart_dma.h" #include "connector_uart_dma.h"
// These may not be defined due to the HAL, but they're necessary for the compiler to do it's magic
class UARTDriver;
class UartDmaTsChannel;
class UartTsChannel;
class SerialTsChannel;
#if HAS_PRIMARY #if HAS_PRIMARY
#ifdef TS_PRIMARY_UART #ifdef TS_PRIMARY_PORT
#if EFI_USE_UART_DMA
UartDmaTsChannel primaryChannel(TS_PRIMARY_UART); // We want to instantiate the correct channel type depending on what type of serial port we're
#else // using. ChibiOS supports two - UART and Serial. We compare the type of the port we're given
UartTsChannel primaryChannel(TS_PRIMARY_UART); // against UartDriver and decide whether to instantiate a UART TS Channel or a Serial version. The
#endif // UART is further subdivided into two depending whether we support DMA or not. We use the right
#elif defined(TS_PRIMARY_SERIAL) // combination of std::conditional, std::is_same, and #if to get what we want.
SerialTsChannel primaryChannel(TS_PRIMARY_SERIAL); std::conditional_t<
#endif std::is_same_v<decltype(TS_PRIMARY_PORT), UARTDriver>,
#if EFI_USE_UART_DMA
UartDmaTsChannel,
#else // EFI_USE_UART_DMA
UartTsChannel,
#endif // EFI_USE_UART_DMA
SerialTsChannel> primaryChannel(TS_PRIMARY_PORT);
#endif // TS_PRIMARY_PORT
struct PrimaryChannelThread : public TunerstudioThread { struct PrimaryChannelThread : public TunerstudioThread {
PrimaryChannelThread() : TunerstudioThread("Primary TS Channel") { } PrimaryChannelThread() : TunerstudioThread("Primary TS Channel") { }
@ -41,15 +54,17 @@
#endif // HAS_PRIMARY #endif // HAS_PRIMARY
#if HAS_SECONDARY #if HAS_SECONDARY
#ifdef TS_SECONDARY_UART #ifdef TS_SECONDARY_PORT
#if EFI_USE_UART_DMA std::conditional_t<
UartDmaTsChannel secondaryChannel(TS_SECONDARY_UART); std::is_same_v<decltype(TS_SECONDARY_PORT), UARTDriver>,
#else #if EFI_USE_UART_DMA
UartTsChannel secondaryChannel(TS_SECONDARY_UART); UartDmaTsChannel,
#endif #else // EFI_USE_UART_DMA
#elif defined(TS_SECONDARY_SERIAL) UartTsChannel,
SerialTsChannel secondaryChannel(TS_SECONDARY_SERIAL); #endif // EFI_USE_UART_DMA
#endif SerialTsChannel> secondaryChannel(TS_SECONDARY_PORT);
#endif // TS_SECONDARY_PORT
struct SecondaryChannelThread : public TunerstudioThread { struct SecondaryChannelThread : public TunerstudioThread {
SecondaryChannelThread() : TunerstudioThread("Secondary TS Channel") { } SecondaryChannelThread() : TunerstudioThread("Secondary TS Channel") { }

View File

@ -114,7 +114,7 @@
*/ */
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
/* Configured in efifeatures.h */ /* Configured in efifeatures.h */
#if defined(TS_PRIMARY_UART) || defined(TS_PRIMARY_SERIAL) #if defined(TS_PRIMARY_PORT)
#define HAL_USE_UART TRUE #define HAL_USE_UART TRUE
#else #else
#define HAL_USE_UART FALSE #define HAL_USE_UART FALSE

View File

@ -121,7 +121,7 @@
*/ */
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
/* Configured in efifeatures.h */ /* Configured in efifeatures.h */
#if defined(TS_PRIMARY_UART) || defined(TS_PRIMARY_SERIAL) #if defined(TS_PRIMARY_PORT)
#define HAL_USE_UART TRUE #define HAL_USE_UART TRUE
#else #else
#define HAL_USE_UART FALSE #define HAL_USE_UART FALSE
@ -200,7 +200,7 @@
*/ */
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
/* Configured in efifeatures.h */ /* Configured in efifeatures.h */
#if defined(TS_PRIMARY_UART) || defined(TS_PRIMARY_SERIAL) #if defined(TS_PRIMARY_PORT)
#define UART_USE_WAIT TRUE #define UART_USE_WAIT TRUE
#else #else
#define UART_USE_WAIT FALSE #define UART_USE_WAIT FALSE

View File

@ -385,7 +385,7 @@
*/ */
#define STM32_SERIAL_USE_USART1 TRUE #define STM32_SERIAL_USE_USART1 TRUE
#define STM32_SERIAL_USE_USART2 TRUE #define STM32_SERIAL_USE_USART2 TRUE
#define STM32_SERIAL_USE_USART3 FALSE #define STM32_SERIAL_USE_USART3 TRUE
#define STM32_SERIAL_USE_UART4 FALSE #define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE #define STM32_SERIAL_USE_UART5 FALSE
#define STM32_SERIAL_USE_USART6 TRUE #define STM32_SERIAL_USE_USART6 TRUE