From a40477e598d2adb44ce034a437f65efbf1e26a55 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 7 Dec 2019 21:22:09 -0500 Subject: [PATCH] Making UART/TTL pins configurable --- firmware/console/binary/tunerstudio_io.cpp | 4 ++++ firmware/controllers/engine_controller.cpp | 2 +- firmware/tunerstudio/rusefi.input | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index f56a5318d4..9a6111ea5a 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -102,6 +102,10 @@ void startTsPort(ts_channel_s *tsChannel) { if (CONFIGB(useSerialPort)) { print("TunerStudio over USART"); + /** + * We have hard-coded USB serial console so that it would be clear how to connect to each specific board, + * but for UART serial we allow users to change settings. + */ efiSetPadMode("tunerstudio rx", engineConfiguration->binarySerialRxPin, PAL_MODE_ALTERNATE(TS_SERIAL_AF)); efiSetPadMode("tunerstudio tx", engineConfiguration->binarySerialTxPin, PAL_MODE_ALTERNATE(TS_SERIAL_AF)); diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 8acf91751d..202abfe541 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -819,6 +819,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20191202; + return 20191206; } #endif /* EFI_UNIT_TEST */ diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 5ab872d64d..2d4638cf79 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -2191,7 +2191,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->Connection dialog = tsPort, "TunerStudio Port" field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed - field = "Use PC10/PC11 serial?", useSerialPort + field = "Use UART/TTL serial?", useSerialPort field = "RX pin", binarySerialRxPin, {useSerialPort == 1} field = "TX pin", binarySerialTxPin, {useSerialPort == 1} field = "uartConsoleSerialSpeed", uartConsoleSerialSpeed