From cc35e8a9b0e83055f322704d90aac8c254341149 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 1 Apr 2020 19:00:56 -0400 Subject: [PATCH] code style --- firmware/bootloader/bootloader.h | 5 +---- firmware/bootloader/src/dfu.h | 5 +---- firmware/config/boards/prometheus/efifeatures.h | 4 +--- firmware/config/boards/subaru-ej20gn/efifeatures.h | 4 +--- firmware/config/engines/mazda_miata_1_6.h | 4 +--- firmware/config/engines/me7pnp.h | 4 +--- firmware/config/engines/mitsubishi.h | 5 ++--- firmware/config/engines/rover_v8.h | 5 +---- firmware/config/engines/sachs.h | 4 +--- firmware/config/engines/subaru.h | 4 ---- firmware/console/binary/bluetooth.h | 5 +---- firmware/console/binary/tunerstudio.h | 6 +----- firmware/console/binary/tunerstudio_io.h | 4 +--- firmware/console/console_io.h | 4 +--- firmware/console/eficonsole.h | 5 +---- firmware/controllers/engine_controller.cpp | 6 ++---- firmware/controllers/gauges/malfunction_indicator.h | 5 +---- firmware/controllers/gauges/tachometer.cpp | 2 +- firmware/controllers/gauges/tachometer.h | 6 ++---- firmware/controllers/trigger/decoders/trigger_rover.h | 5 ++--- firmware/controllers/trigger/decoders/trigger_universal.h | 5 +---- firmware/development/engine_emulator.h | 4 +--- firmware/development/engine_sniffer.h | 4 +--- firmware/development/hw_layer/poten.h | 4 +--- firmware/development/trigger_emulator.h | 4 +--- firmware/hw_layer/algo/adc_math.h | 4 +--- firmware/hw_layer/cdm_ion_sense.h | 4 +--- firmware/hw_layer/lcd/lcd_HD44780.h | 4 +--- firmware/hw_layer/mmc_card.h | 4 +--- firmware/hw_layer/pin_repository.h | 4 +--- firmware/hw_layer/sensors/accelerometer.h | 5 +---- firmware/hw_layer/sensors/cj125_logic.h | 4 +--- firmware/hw_layer/smart_gpio.h | 4 +--- firmware/hw_layer/stepper.h | 5 ++--- 34 files changed, 38 insertions(+), 113 deletions(-) diff --git a/firmware/bootloader/bootloader.h b/firmware/bootloader/bootloader.h index db6b7b25c1..33c2b54e6d 100644 --- a/firmware/bootloader/bootloader.h +++ b/firmware/bootloader/bootloader.h @@ -1,5 +1,4 @@ -#ifndef BOOTLOADER_H_ -#define BOOTLOADER_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -13,5 +12,3 @@ int initBootloader(void); #ifdef __cplusplus } #endif - -#endif /* BOOTLOADER_H_ */ diff --git a/firmware/bootloader/src/dfu.h b/firmware/bootloader/src/dfu.h index 05642df657..bb5dfc6a59 100644 --- a/firmware/bootloader/src/dfu.h +++ b/firmware/bootloader/src/dfu.h @@ -1,5 +1,4 @@ -#ifndef DFU_H_ -#define DFU_H_ +#pragma once #include "tunerstudio_io.h" @@ -51,5 +50,3 @@ void dfuJumpToApp(uint32_t addr); ts_channel_s *getTsChannel(); - -#endif /* DFU_H_ */ diff --git a/firmware/config/boards/prometheus/efifeatures.h b/firmware/config/boards/prometheus/efifeatures.h index ecf7eba807..41545c8934 100644 --- a/firmware/config/boards/prometheus/efifeatures.h +++ b/firmware/config/boards/prometheus/efifeatures.h @@ -9,8 +9,7 @@ #include "../../stm32f4ems/efifeatures.h" -#ifndef EFIFEATURES_PROMETHEUS_H_ -#define EFIFEATURES_PROMETHEUS_H_ +#pragma once #undef EFI_RTC #define EFI_RTC FALSE @@ -115,4 +114,3 @@ #define EFI_NARROW_EGO_AVERAGING TRUE -#endif /* EFIFEATURES_PROMETHEUS_H_ */ diff --git a/firmware/config/boards/subaru-ej20gn/efifeatures.h b/firmware/config/boards/subaru-ej20gn/efifeatures.h index 93e09ab7cc..fad647cd57 100644 --- a/firmware/config/boards/subaru-ej20gn/efifeatures.h +++ b/firmware/config/boards/subaru-ej20gn/efifeatures.h @@ -9,8 +9,7 @@ #include "../../stm32f7ems/efifeatures.h" -#ifndef EFIFEATURES_SUBARUEJ20G_H_ -#define EFIFEATURES_SUBARUEJ20G_H_ +#pragma once /* debug console */ #undef EFI_USE_UART_FOR_CONSOLE @@ -113,4 +112,3 @@ #define EFI_NARROW_EGO_AVERAGING TRUE -#endif /* EFIFEATURES_SUBARUEJ20G_H_ */ diff --git a/firmware/config/engines/mazda_miata_1_6.h b/firmware/config/engines/mazda_miata_1_6.h index 9c61d7754a..4db98a5094 100644 --- a/firmware/config/engines/mazda_miata_1_6.h +++ b/firmware/config/engines/mazda_miata_1_6.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ -#define CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ +#pragma once #include "engine_configuration.h" @@ -16,4 +15,3 @@ void miataNAcommon(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ */ diff --git a/firmware/config/engines/me7pnp.h b/firmware/config/engines/me7pnp.h index d0c61dcdd4..bbfc95a996 100644 --- a/firmware/config/engines/me7pnp.h +++ b/firmware/config/engines/me7pnp.h @@ -5,11 +5,9 @@ * Author: Ola */ -#ifndef CONFIG_ENGINES_ME7PNP_H_ -#define CONFIG_ENGINES_ME7PNP_H_ +#pragma once #include "engine_configuration.h" void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* CONFIG_ENGINES_ME7PNP_H_ */ diff --git a/firmware/config/engines/mitsubishi.h b/firmware/config/engines/mitsubishi.h index cf42c991cd..cf5b420e0c 100644 --- a/firmware/config/engines/mitsubishi.h +++ b/firmware/config/engines/mitsubishi.h @@ -4,11 +4,10 @@ * @date Aug 5, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MITSUBISHI_H_ -#define MITSUBISHI_H_ + +#pragma once #include "engine_configuration.h" void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* MITSUBISHI_H_ */ diff --git a/firmware/config/engines/rover_v8.h b/firmware/config/engines/rover_v8.h index 5c7a7f6fa3..bdb67c1896 100644 --- a/firmware/config/engines/rover_v8.h +++ b/firmware/config/engines/rover_v8.h @@ -4,12 +4,9 @@ * @date Jun 27, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ROVER_V8_H_ -#define ROVER_V8_H_ +#pragma once #include "engine_configuration.h" void setFrankenstein_01_LCD(engine_configuration_s *engineConfiguration); void setRoverv8(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* ROVER_V8_H_ */ diff --git a/firmware/config/engines/sachs.h b/firmware/config/engines/sachs.h index 0a502ae2a9..d9207a75d6 100644 --- a/firmware/config/engines/sachs.h +++ b/firmware/config/engines/sachs.h @@ -4,11 +4,9 @@ * @date Jan 26, 2015 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONFIG_ENGINES_SACHS_H_ -#define CONFIG_ENGINES_SACHS_H_ +#pragma once #include "engine_configuration.h" void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* CONFIG_ENGINES_SACHS_H_ */ diff --git a/firmware/config/engines/subaru.h b/firmware/config/engines/subaru.h index bc52e5bd36..d2a80494ed 100644 --- a/firmware/config/engines/subaru.h +++ b/firmware/config/engines/subaru.h @@ -4,12 +4,8 @@ * @date Sep 14, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef SUBARU_H_ -#define SUBARU_H_ #include "engine_configuration.h" void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* SUBARU_H_ */ diff --git a/firmware/console/binary/bluetooth.h b/firmware/console/binary/bluetooth.h index 413d2b0a2a..bf9cb77f4c 100644 --- a/firmware/console/binary/bluetooth.h +++ b/firmware/console/binary/bluetooth.h @@ -5,9 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef BLUETOOTH_H_ -#define BLUETOOTH_H_ - +#pragma once #include "global.h" #include "tunerstudio_io.h" @@ -44,4 +42,3 @@ void bluetoothCancel(void); */ void bluetoothSoftwareDisconnectNotify(); -#endif /* BLUETOOTH_H_ */ diff --git a/firmware/console/binary/tunerstudio.h b/firmware/console/binary/tunerstudio.h index 43a66d01a2..68de8966fb 100644 --- a/firmware/console/binary/tunerstudio.h +++ b/firmware/console/binary/tunerstudio.h @@ -5,9 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef TUNERSTUDIO_H_ -#define TUNERSTUDIO_H_ - +#pragma once #include "global.h" #include "tunerstudio_io.h" @@ -106,5 +104,3 @@ typedef pre_packed struct } TunerStudioWriteValueRequest; #endif /* EFI_TUNER_STUDIO */ - -#endif /* TUNERSTUDIO_H_ */ diff --git a/firmware/console/binary/tunerstudio_io.h b/firmware/console/binary/tunerstudio_io.h index 555f19014e..fe386373e7 100644 --- a/firmware/console/binary/tunerstudio_io.h +++ b/firmware/console/binary/tunerstudio_io.h @@ -4,9 +4,8 @@ * @date Mar 8, 2015 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ -#define CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ +#pragma once #include "global.h" #if EFI_PROD_CODE @@ -109,4 +108,3 @@ int sr5ReadData(ts_channel_s *tsChannel, uint8_t * buffer, int size); int sr5ReadDataTimeout(ts_channel_s *tsChannel, uint8_t * buffer, int size, int timeout); bool sr5IsReady(ts_channel_s *tsChannel); -#endif /* CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ */ diff --git a/firmware/console/console_io.h b/firmware/console/console_io.h index 6527f9b1cf..84581000d8 100644 --- a/firmware/console/console_io.h +++ b/firmware/console/console_io.h @@ -4,9 +4,8 @@ * @date Dec 29, 2012 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONSOLE_IO_H_ -#define CONSOLE_IO_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -42,4 +41,3 @@ bool isCommandLineConsoleReady(void); #define isCommandLineConsoleReady() true #endif -#endif /* CONSOLE_IO_H_ */ diff --git a/firmware/console/eficonsole.h b/firmware/console/eficonsole.h index f28f4adab3..f171a77aaa 100644 --- a/firmware/console/eficonsole.h +++ b/firmware/console/eficonsole.h @@ -6,12 +6,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef RFICONSOLE_H_ -#define RFICONSOLE_H_ - +#pragma once #include "datalogging.h" void initializeConsole(Logging *sharedLogger); void print(const char *fmt, ...); -#endif /* RFICONSOLE_H_ */ diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 8a0c76b092..66d267f185 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -54,6 +54,7 @@ #include "perf_trace.h" #include "boost_control.h" #include "launch_control.h" +#include "tachometer.h" #if EFI_SENSOR_CHART #include "sensor_chart.h" @@ -91,7 +92,6 @@ #include "pwm_generator.h" #include "lcd_controller.h" #include "pin_repository.h" -#include "tachometer.h" #endif /* EFI_PROD_CODE */ #if EFI_CJ125 @@ -655,6 +655,7 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S } #endif /* EFI_ENGINE_CONTROL */ + initTachometer(PASS_ENGINE_PARAMETER_SIGNATURE); } #if !EFI_UNIT_TEST @@ -730,9 +731,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) initLcdController(); #endif /* EFI_HD44780_LCD */ -#if EFI_PROD_CODE - initTachometer(); -#endif /* EFI_PROD_CODE */ } // these two variables are here only to let us know how much RAM is available, also these diff --git a/firmware/controllers/gauges/malfunction_indicator.h b/firmware/controllers/gauges/malfunction_indicator.h index d32c1abd0e..b6dc14581f 100644 --- a/firmware/controllers/gauges/malfunction_indicator.h +++ b/firmware/controllers/gauges/malfunction_indicator.h @@ -8,10 +8,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MALFUNCTION_INDICATOR_H_ -#define MALFUNCTION_INDICATOR_H_ +#pragma once -#include "global.h" #include "engine.h" #if EFI_MALFUNCTION_INDICATOR @@ -21,4 +19,3 @@ void initMalfunctionIndicator(void); #endif /* EFI_MALFUNCTION_INDICATOR */ -#endif /* MALFUNCTION_INDICATOR_H_ */ diff --git a/firmware/controllers/gauges/tachometer.cpp b/firmware/controllers/gauges/tachometer.cpp index 8352eb4da8..334da9a7b4 100644 --- a/firmware/controllers/gauges/tachometer.cpp +++ b/firmware/controllers/gauges/tachometer.cpp @@ -40,7 +40,7 @@ static void tachSignalCallback(trigger_event_e ckpSignalType, engine->executor.scheduleForLater(&tachTurnSignalOff, (int)MS2US(durationMs), &turnTachPinLow); } -void initTachometer(void) { +void initTachometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (CONFIG(tachOutputPin) == GPIO_UNASSIGNED) { return; } diff --git a/firmware/controllers/gauges/tachometer.h b/firmware/controllers/gauges/tachometer.h index bfeefe755d..6f4608641d 100644 --- a/firmware/controllers/gauges/tachometer.h +++ b/firmware/controllers/gauges/tachometer.h @@ -5,11 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_TACHOMETER_H_ -#define CONTROLLERS_TACHOMETER_H_ +#pragma once #include "engine.h" -void initTachometer(void); +void initTachometer(DECLARE_ENGINE_PARAMETER_SIGNATURE); -#endif /* CONTROLLERS_TACHOMETER_H_ */ diff --git a/firmware/controllers/trigger/decoders/trigger_rover.h b/firmware/controllers/trigger/decoders/trigger_rover.h index e92c220562..7c127950f0 100644 --- a/firmware/controllers/trigger/decoders/trigger_rover.h +++ b/firmware/controllers/trigger/decoders/trigger_rover.h @@ -6,11 +6,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ -#define CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ +#pragma once #include "trigger_structure.h" void initializeRoverK(TriggerWaveform *s); -#endif /* CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ */ + diff --git a/firmware/controllers/trigger/decoders/trigger_universal.h b/firmware/controllers/trigger/decoders/trigger_universal.h index b6c607115c..c444a98492 100644 --- a/firmware/controllers/trigger/decoders/trigger_universal.h +++ b/firmware/controllers/trigger/decoders/trigger_universal.h @@ -6,9 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ -#define CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ - +#pragma once #include "trigger_structure.h" #define NO_LEFT_FILTER -1 @@ -27,4 +25,3 @@ void configureOnePlus60_2(TriggerWaveform *s, operation_mode_e operationMode); void configure3_1_cam(TriggerWaveform *s, operation_mode_e operationMode); void configureOnePlusOne(TriggerWaveform *s, operation_mode_e operationMode); -#endif /* CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ */ diff --git a/firmware/development/engine_emulator.h b/firmware/development/engine_emulator.h index b515c74819..a446a34e3a 100644 --- a/firmware/development/engine_emulator.h +++ b/firmware/development/engine_emulator.h @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ENGINE_EMULATOR_H_ -#define ENGINE_EMULATOR_H_ +#pragma once #include "engine.h" void initEngineEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); -#endif /* ENGINE_EMULATOR_H_ */ diff --git a/firmware/development/engine_sniffer.h b/firmware/development/engine_sniffer.h index e5775d894f..f53b6486cf 100644 --- a/firmware/development/engine_sniffer.h +++ b/firmware/development/engine_sniffer.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef WAVE_CHART_H_ -#define WAVE_CHART_H_ +#pragma once #include "global.h" @@ -48,4 +47,3 @@ void setChartSize(int newSize); #endif /* EFI_ENGINE_SNIFFER */ -#endif /* WAVE_CHART_H_ */ diff --git a/firmware/development/hw_layer/poten.h b/firmware/development/hw_layer/poten.h index 5e4b919df4..014395dd24 100644 --- a/firmware/development/hw_layer/poten.h +++ b/firmware/development/hw_layer/poten.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef POTEN_H_ -#define POTEN_H_ +#pragma once #include "global.h" @@ -26,4 +25,3 @@ void setPotResistance(Mcp42010Driver *driver, int channel, int resistance); #endif -#endif /* POTEN_H_ */ diff --git a/firmware/development/trigger_emulator.h b/firmware/development/trigger_emulator.h index 96264d26d1..c4d3193beb 100644 --- a/firmware/development/trigger_emulator.h +++ b/firmware/development/trigger_emulator.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef DIST_EMULATOR_H_ -#define DIST_EMULATOR_H_ +#pragma once #include "global.h" @@ -18,4 +17,3 @@ void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX); void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration); -#endif /* DIST_EMULATOR_H_ */ diff --git a/firmware/hw_layer/algo/adc_math.h b/firmware/hw_layer/algo/adc_math.h index 0aaccab889..3e1bd72a95 100644 --- a/firmware/hw_layer/algo/adc_math.h +++ b/firmware/hw_layer/algo/adc_math.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ADC_MATH_H_ -#define ADC_MATH_H_ +#pragma once #include "engine_configuration.h" #define ADC_MAX_VALUE 4095 @@ -22,4 +21,3 @@ float getVoltage(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER float getVoltageDivided(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX); -#endif /* ADC_MATH_H_ */ diff --git a/firmware/hw_layer/cdm_ion_sense.h b/firmware/hw_layer/cdm_ion_sense.h index 2e4be711a6..d3d678794a 100644 --- a/firmware/hw_layer/cdm_ion_sense.h +++ b/firmware/hw_layer/cdm_ion_sense.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_CDM_ION_SENSE_H_ -#define HW_LAYER_CDM_ION_SENSE_H_ +#pragma once #include "global.h" @@ -38,4 +37,3 @@ void ionPostState(TunerStudioOutputChannels *tsOutputChannels); void cdmIonInit(void); int getCurrentCdmValue(int currentRevolution); -#endif /* HW_LAYER_CDM_ION_SENSE_H_ */ diff --git a/firmware/hw_layer/lcd/lcd_HD44780.h b/firmware/hw_layer/lcd/lcd_HD44780.h index 467671f539..77a0931163 100644 --- a/firmware/hw_layer/lcd/lcd_HD44780.h +++ b/firmware/hw_layer/lcd/lcd_HD44780.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef LCD_HD44780_H_ -#define LCD_HD44780_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -28,4 +27,3 @@ void lcdShowPanicMessage(char *message); } #endif /* __cplusplus */ -#endif /* LCD_HD44780_H_ */ diff --git a/firmware/hw_layer/mmc_card.h b/firmware/hw_layer/mmc_card.h index 7c35d8ca6b..affa1da67c 100644 --- a/firmware/hw_layer/mmc_card.h +++ b/firmware/hw_layer/mmc_card.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MMC_CARD_H_ -#define MMC_CARD_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -25,4 +24,3 @@ void readLogFileContent(char *buffer, short fileId, short offset, short length); } #endif /* __cplusplus */ -#endif /* MMC_CARD_H_ */ diff --git a/firmware/hw_layer/pin_repository.h b/firmware/hw_layer/pin_repository.h index c5b3d2bd69..5312dec00a 100644 --- a/firmware/hw_layer/pin_repository.h +++ b/firmware/hw_layer/pin_repository.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef PIN_REPOSITORY_H_ -#define PIN_REPOSITORY_H_ +#pragma once #include "global.h" #include "io_pins.h" @@ -57,4 +56,3 @@ void initBrainUsedPins(void); const char* & getBrainUsedPin(unsigned int idx); #endif -#endif /* PIN_REPOSITORY_H_ */ diff --git a/firmware/hw_layer/sensors/accelerometer.h b/firmware/hw_layer/sensors/accelerometer.h index 032d3f6f33..6e38c176b1 100644 --- a/firmware/hw_layer/sensors/accelerometer.h +++ b/firmware/hw_layer/sensors/accelerometer.h @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_ACCELEROMETER_H_ -#define HW_LAYER_ACCELEROMETER_H_ +#pragma once -#include "global.h" #include "engine.h" void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -24,4 +22,3 @@ float getLongitudinalAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE); */ float getTransverseAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE); -#endif /* HW_LAYER_ACCELEROMETER_H_ */ diff --git a/firmware/hw_layer/sensors/cj125_logic.h b/firmware/hw_layer/sensors/cj125_logic.h index 5bd2a192a8..b8308aef51 100644 --- a/firmware/hw_layer/sensors/cj125_logic.h +++ b/firmware/hw_layer/sensors/cj125_logic.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_SENSORS_CJ125_LOGIC_H_ -#define HW_LAYER_SENSORS_CJ125_LOGIC_H_ +#pragma once #include "engine_configuration.h" #include "pwm_generator_logic.h" @@ -149,4 +148,3 @@ public: #define CJ125_PID_LSU49_P (8.0f) #define CJ125_PID_LSU49_I (0.003f) -#endif /* HW_LAYER_SENSORS_CJ125_LOGIC_H_ */ diff --git a/firmware/hw_layer/smart_gpio.h b/firmware/hw_layer/smart_gpio.h index afec2e1364..8c4f6ac4eb 100644 --- a/firmware/hw_layer/smart_gpio.h +++ b/firmware/hw_layer/smart_gpio.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_SMART_GPIO_H_ -#define HW_LAYER_SMART_GPIO_H_ +#pragma once /* TLE6240 pins go right after on chips */ #define TLE6240_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + (n))) @@ -17,4 +16,3 @@ void initSmartGpio(void); void startSmartCsPins(); void stopSmartCsPins(); -#endif /* HW_LAYER_SMART_GPIO_H_ */ diff --git a/firmware/hw_layer/stepper.h b/firmware/hw_layer/stepper.h index 8f997a117b..128afc6dc6 100644 --- a/firmware/hw_layer/stepper.h +++ b/firmware/hw_layer/stepper.h @@ -4,8 +4,8 @@ * @date Dec 24, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef STEPPER_H_ -#define STEPPER_H_ + +#pragma once #include "global.h" #include "efi_gpio.h" @@ -76,4 +76,3 @@ private: int m_targetPosition = 0; }; -#endif /* STEPPER_H_ */