code style & pleasing LGTM

This commit is contained in:
rusefi 2020-02-18 08:16:19 -05:00
parent 269050d197
commit b84971cc6a
17 changed files with 21 additions and 44 deletions

View File

@ -5,6 +5,8 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
#include "engine_configuration.h"
void setDaihatsu(DECLARE_CONFIG_PARAMETER_SIGNATURE);

View File

@ -4,8 +4,8 @@
* @date May 3, 2014
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef ADCCONFIGURATION_H_
#define ADCCONFIGURATION_H_
#pragma once
#if HAL_USE_ADC
@ -54,4 +54,3 @@ private:
#endif /* HAL_USE_ADC */
#endif /* ADCCONFIGURATION_H_ */

View File

@ -7,8 +7,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef ADC_EXTERNAL_H_
#define ADC_EXTERNAL_H_
#pragma once
#include "mcp3208.h"
@ -16,4 +15,3 @@
#define adcToVoltsDivided(adc) (5.0f / 4095 * adc)
#define getVoltageDivided(msg, channel) (channel == EFI_ADC_NONE ? 66.66 : adcToVoltsDivided(getAdcValue(msg, channel)))
#endif /* ADC_EXTERNAL_H_ */

View File

@ -6,8 +6,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef ADC_INPUTS_H_
#define ADC_INPUTS_H_
#pragma once
#include "global.h"
#include "adc_math.h"
@ -52,4 +51,3 @@ void removeChannel(const char *name, adc_channel_e setting);
#define getAdcValue(msg, channel) 0
#endif /* HAL_USE_ADC */
#endif /* ADC_INPUTS_H_ */

View File

@ -5,8 +5,7 @@
* @date Dec 19, 2017
*/
#ifndef BACKUP_RAM_H_
#define BACKUP_RAM_H_
#pragma once
#include "global.h"
#include "efi_gpio.h"
@ -43,4 +42,3 @@ uint32_t backupRamLoad(backup_ram_e idx);
// use backup-power RTC registers (non-volatile memory) to store the data
void backupRamSave(backup_ram_e idx, uint32_t value);
#endif /* BACKUP_RAM_H_ */

View File

@ -5,6 +5,8 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
#include "digital_input.h"
#if HAL_USE_PAL

View File

@ -2,8 +2,8 @@
* @file flash.h
*
*/
#ifndef FLASH_H
#define FLASH_H
#pragma once
#include "global.h"
@ -165,4 +165,3 @@ int flashWrite(flashaddr_t address, const char* buffer, size_t size);
}
#endif /* __cplusplus */
#endif /* FLASH_H */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef HARDWARE_H_
#define HARDWARE_H_
#pragma once
#include "global.h"
@ -56,4 +55,3 @@ void setBor(int borValue);
#endif /* __cplusplus */
#endif /* HARDWARE_H_ */

View File

@ -8,7 +8,6 @@
#pragma once
// 0b01110001
#define SET_ADVANCED_MODE 0x71

View File

@ -6,8 +6,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef IO_PINS_H_
#define IO_PINS_H_
#pragma once
#include "global.h"
@ -63,4 +62,3 @@ EXTERNC void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *conf
#endif /* HAL_USE_ICU */
#endif /* EFI_GPIO_HARDWARE */
#endif /* IO_PINS_H_ */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef MAX31855_H_
#define MAX31855_H_
#pragma once
#include "global.h"
#include "engine_configuration.h"
@ -17,4 +16,3 @@ void initMax31855(Logging *sharedLogger, spi_device_e device, egt_cs_array_t max
uint16_t getEgtValue(int egtChannel);
#endif /* MAX31855_H_ */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef HW_LAYER_MC33816_H_
#define HW_LAYER_MC33816_H_
#pragma once
const int MAX_SPI_MODE_A_TRANSFER_SIZE = 31; //max size for register config transfer
@ -25,4 +24,3 @@ enum {
void initMc33816(void);
#endif /* HW_LAYER_MC33816_H_ */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef HW_LAYER_MC33816_DATA_H_
#define HW_LAYER_MC33816_DATA_H_
#pragma once
extern const unsigned short MC33816_code_RAM1[62]; // CODE RAM CH 1
extern const unsigned short MC33816_code_RAM2[43]; // CODE RAM CH 2
@ -17,4 +16,3 @@ extern const unsigned short MC33816_ch2_config[19]; // CH 2 configurations
extern const unsigned short MC33816_io_config[44]; // IO configurations
extern const unsigned short MC33816_diag_config[44]; // diag configurations
#endif /* HW_LAYER_MC33816_DATA_H_ */

View File

@ -13,8 +13,7 @@
*
*/
#ifndef MCP3208_H_
#define MCP3208_H_
#pragma once
#include "global.h"
@ -43,4 +42,3 @@ int getMcp3208adc(int channel);
#endif /* EFI_MCP_3208 */
#endif /* MCP3208_H_ */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef PWM_GENERATOR_H_
#define PWM_GENERATOR_H_
#pragma once
#include "global.h"
#include "pwm_generator_logic.h"
@ -23,4 +22,3 @@ void initPwmGenerator(void);
*/
void applyPinState(int stateIndex, PwmConfig* state) /* pwm_gen_callback */;
#endif /* PWM_GENERATOR_H_ */

View File

@ -6,8 +6,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef RTC_HELPER_H_
#define RTC_HELPER_H_
#pragma once
void printDateTime(void);
void setDateTime(const char *strDate);
@ -16,5 +15,3 @@ void date_set_tm(struct tm *);
void date_get_tm(struct tm *);
void dateToString(char *buffer);
bool dateToStringShort(char *lcd_str);
#endif /* RTC_HELPER_H_ */

View File

@ -4,11 +4,10 @@
* @date Jan 3, 2015
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#ifndef HW_LAYER_SERVO_H_
#define HW_LAYER_SERVO_H_
#pragma once
#include "global.h"
void initServo(void);
#endif /* HW_LAYER_SERVO_H_ */