diff --git a/firmware/development/wave_analyzer.cpp b/firmware/development/wave_analyzer.cpp index 81acc4c970..ffc5c3e727 100644 --- a/firmware/development/wave_analyzer.cpp +++ b/firmware/development/wave_analyzer.cpp @@ -151,7 +151,7 @@ static void waTriggerEventListener(trigger_event_e ckpSignalType, uint32_t index previousEngineCycleTimeUs = nowUs; } -static msg_t waThread(void *arg) { +static THD_FUNCTION(waThread, arg) { (void)arg; chRegSetThreadName("Wave Analyzer"); #if EFI_ENGINE_SNIFFER @@ -161,9 +161,6 @@ static msg_t waThread(void *arg) { waveChart.publishChartIfFull(); } #endif /* EFI_ENGINE_SNIFFER */ -#if defined __GNUC__ - return -1; -#endif } static uint32_t getWaveLowWidth(int index) { @@ -256,7 +253,7 @@ void initWaveAnalyzer(Logging *sharedLogger) { addConsoleActionII("set_logic_input_mode", setWaveModeSilent); - chThdCreateStatic(waThreadStack, sizeof(waThreadStack), NORMALPRIO, waThread, (void*) NULL); + chThdCreateStatic(waThreadStack, sizeof(waThreadStack), NORMALPRIO, (tfunc_t)waThread, NULL); #else print("wave disabled\r\n"); diff --git a/firmware/global.h b/firmware/global.h index 75281ca4a6..53fb1a3851 100644 --- a/firmware/global.h +++ b/firmware/global.h @@ -59,6 +59,8 @@ typedef EventListener event_listener_t; typedef Thread thread_t; #define THD_WORKING_AREA WORKING_AREA +#define THD_FUNCTION(tname, arg) void tname(void *arg) + #if EFI_PROD_CODE