Making UART/TTL pins configurable

This commit is contained in:
rusefi 2019-12-07 21:22:09 -05:00
parent 45fac99faa
commit a40477e598
3 changed files with 6 additions and 2 deletions

View File

@ -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));

View File

@ -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 */

View File

@ -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