From d8898a46656f5b2c13c386ad17f28f164a95feea Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 13 Mar 2024 00:56:53 -0700 Subject: [PATCH] cherry picks from #385 --- firmware/console/binary/tunerstudio_io_serial_ports.cpp | 2 ++ simulator/main.cpp | 2 +- unit_tests/global.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/console/binary/tunerstudio_io_serial_ports.cpp b/firmware/console/binary/tunerstudio_io_serial_ports.cpp index 0edc7e5ab6..f32a8e6b09 100644 --- a/firmware/console/binary/tunerstudio_io_serial_ports.cpp +++ b/firmware/console/binary/tunerstudio_io_serial_ports.cpp @@ -15,7 +15,9 @@ #endif // HW_HELLEN // These may not be defined due to the HAL, but they're necessary for the compiler to do it's magic +#if !HAL_USE_UART class UARTDriver; +#endif // !HAL_USE_UART class UartDmaTsChannel; class UartTsChannel; class SerialTsChannel; diff --git a/simulator/main.cpp b/simulator/main.cpp index 521ab480b1..71a57fc26e 100644 --- a/simulator/main.cpp +++ b/simulator/main.cpp @@ -158,7 +158,7 @@ int main(int argc, char** argv) { printf("Running rusEFI simulator for %d seconds, then exiting.\n\n", timeoutSeconds); chSysLock(); - chVTSetI(&exitTimer, MY_US2ST(timeoutSeconds * 1e6), [](void*) { exit(0); }, 0); + chVTSetI(&exitTimer, MY_US2ST(timeoutSeconds * 1e6), [](void*) { exit(0); }, nullptr); chSysUnlock(); } diff --git a/unit_tests/global.h b/unit_tests/global.h index d6415cf77e..a157c02aaa 100644 --- a/unit_tests/global.h +++ b/unit_tests/global.h @@ -72,6 +72,8 @@ namespace chibios_rt { } #endif +struct virtual_timer_t; + #define UNIT_TEST_BUSY_WAIT_CALLBACK() { timeNowUs++; } #define chsnprintf snprintf