From 9558ae2519bce613ef003977f0ae9f8abf37a14b Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Thu, 1 Dec 2016 18:11:52 +0000 Subject: [PATCH] Change tabs to spaces and remove trailing whitespace --- src/main/common/typeconversion.c | 8 ++++---- src/main/config/config_master.h | 4 ++-- src/main/drivers/accgyro_adxl345.c | 2 +- src/main/drivers/adc_stm32f10x.c | 2 +- src/main/drivers/adc_stm32f30x.c | 4 ++-- src/main/drivers/adc_stm32f4xx.c | 2 +- src/main/drivers/compass_hmc5883l.c | 2 +- src/main/drivers/pwm_output_stm32f3xx.c | 2 +- src/main/drivers/pwm_output_stm32f4xx.c | 2 +- src/main/drivers/serial_uart_stm32f7xx.c | 2 +- src/main/target/ALIENFLIGHTF3/target.c | 2 +- src/main/target/ANYFCF7/stm32f7xx_hal_conf.h | 4 ++-- src/main/target/BLUEJAYF4/config.c | 6 +++--- src/main/target/FURYF3/target.c | 2 +- src/main/target/FURYF7/stm32f7xx_hal_conf.h | 4 ++-- src/main/target/KAKUTEF4/target.c | 4 ++-- src/main/target/REVO/target.h | 2 +- src/main/target/SPRACINGF3/target.h | 4 ++-- src/main/target/common.h | 2 +- 19 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/common/typeconversion.c b/src/main/common/typeconversion.c index 98a2ac881..9c2ffcc73 100644 --- a/src/main/common/typeconversion.c +++ b/src/main/common/typeconversion.c @@ -31,9 +31,9 @@ void uli2a(unsigned long int num, unsigned int base, int uc, char *bf) while (d != 0) { int dgt = num / d; - *bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10); + *bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10); - // Next digit + // Next digit num %= d; d /= base; } @@ -60,9 +60,9 @@ void ui2a(unsigned int num, unsigned int base, int uc, char *bf) while (d != 0) { int dgt = num / d; - *bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10); + *bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10); - // Next digit + // Next digit num %= d; d /= base; } diff --git a/src/main/config/config_master.h b/src/main/config/config_master.h index 06d078643..f07a522d2 100644 --- a/src/main/config/config_master.h +++ b/src/main/config/config_master.h @@ -172,7 +172,7 @@ typedef struct master_s { #ifdef USE_PPM ppmConfig_t ppmConfig; #endif - + #ifdef USE_PWM pwmConfig_t pwmConfig; #endif @@ -209,7 +209,7 @@ typedef struct master_s { #ifdef USE_MAX7456 vcdProfile_t vcdProfile; #endif - + #ifdef USE_SDCARD sdcardConfig_t sdcardConfig; #endif diff --git a/src/main/drivers/accgyro_adxl345.c b/src/main/drivers/accgyro_adxl345.c index 848b04a7a..86ee11f4f 100644 --- a/src/main/drivers/accgyro_adxl345.c +++ b/src/main/drivers/accgyro_adxl345.c @@ -65,7 +65,7 @@ bool adxl345Detect(drv_adxl345_config_t *init, accDev_t *acc) { uint8_t sig = 0; bool ack = i2cRead(MPU_I2C_INSTANCE, ADXL345_ADDRESS, 0x00, 1, &sig); - + if (!ack || sig != 0xE5) return false; diff --git a/src/main/drivers/adc_stm32f10x.c b/src/main/drivers/adc_stm32f10x.c index f6a98f8af..c3e06f0e5 100644 --- a/src/main/drivers/adc_stm32f10x.c +++ b/src/main/drivers/adc_stm32f10x.c @@ -119,7 +119,7 @@ void adcInit(adcConfig_t *config) adcOperatingConfig[i].sampleTime = ADC_SampleTime_239Cycles5; adcOperatingConfig[i].enabled = true; } - + if (!adcActive) { return; } diff --git a/src/main/drivers/adc_stm32f30x.c b/src/main/drivers/adc_stm32f30x.c index 13623a4e1..e51ee9805 100644 --- a/src/main/drivers/adc_stm32f30x.c +++ b/src/main/drivers/adc_stm32f30x.c @@ -128,7 +128,7 @@ void adcInit(adcConfig_t *config) if (config->currentMeter.enabled) { adcOperatingConfig[ADC_CURRENT].tag = config->currentMeter.ioTag; //CURRENT_METER_ADC_CHANNEL; } - + ADCDevice device = adcDeviceByInstance(ADC_INSTANCE); if (device == ADCINVALID) return; @@ -155,7 +155,7 @@ void adcInit(adcConfig_t *config) if (!adcActive) { return; } - + if ((device == ADCDEV_1) || (device == ADCDEV_2)) { // enable clock for ADC1+2 RCC_ADCCLKConfig(RCC_ADC12PLLCLK_Div256); // 72 MHz divided by 256 = 281.25 kHz diff --git a/src/main/drivers/adc_stm32f4xx.c b/src/main/drivers/adc_stm32f4xx.c index 36ee525bd..e8de72940 100644 --- a/src/main/drivers/adc_stm32f4xx.c +++ b/src/main/drivers/adc_stm32f4xx.c @@ -136,7 +136,7 @@ void adcInit(adcConfig_t *config) if (!adcActive) { return; } - + RCC_ClockCmd(adc.rccADC, ENABLE); dmaInit(dmaGetIdentifier(adc.DMAy_Streamx), OWNER_ADC, 0); diff --git a/src/main/drivers/compass_hmc5883l.c b/src/main/drivers/compass_hmc5883l.c index 67dc75480..0514d3cad 100644 --- a/src/main/drivers/compass_hmc5883l.c +++ b/src/main/drivers/compass_hmc5883l.c @@ -173,7 +173,7 @@ bool hmc5883lDetect(magDev_t* mag, const hmc5883Config_t *hmc5883ConfigToUse) uint8_t sig = 0; bool ack = i2cRead(MAG_I2C_INSTANCE, MAG_ADDRESS, 0x0A, 1, &sig); - + if (!ack || sig != 'H') return false; diff --git a/src/main/drivers/pwm_output_stm32f3xx.c b/src/main/drivers/pwm_output_stm32f3xx.c index b0db2103e..cad425954 100644 --- a/src/main/drivers/pwm_output_stm32f3xx.c +++ b/src/main/drivers/pwm_output_stm32f3xx.c @@ -74,7 +74,7 @@ void pwmWriteDigital(uint8_t index, uint16_t value) if (!motor->timerHardware->dmaChannel) { return; } - + uint16_t packet = (value << 1) | (motor->requestTelemetry ? 1 : 0); motor->requestTelemetry = false; // reset telemetry request to make sure it's triggered only once in a row diff --git a/src/main/drivers/pwm_output_stm32f4xx.c b/src/main/drivers/pwm_output_stm32f4xx.c index da5eb7544..d10d133ce 100644 --- a/src/main/drivers/pwm_output_stm32f4xx.c +++ b/src/main/drivers/pwm_output_stm32f4xx.c @@ -72,7 +72,7 @@ void pwmWriteDigital(uint8_t index, uint16_t value) if (!motor->timerHardware->dmaStream) { return; } - + uint16_t packet = (value << 1) | (motor->requestTelemetry ? 1 : 0); motor->requestTelemetry = false; // reset telemetry request to make sure it's triggered only once in a row diff --git a/src/main/drivers/serial_uart_stm32f7xx.c b/src/main/drivers/serial_uart_stm32f7xx.c index 966d3b7cf..230d2cca2 100644 --- a/src/main/drivers/serial_uart_stm32f7xx.c +++ b/src/main/drivers/serial_uart_stm32f7xx.c @@ -415,7 +415,7 @@ uartPort_t *serialUART(UARTDevice device, uint32_t baudRate, portMode_t mode, po IOConfigGPIOAF(tx, IOCFG_AF_PP, uart->af); } - if (mode & MODE_RX) { + if (mode & MODE_RX) { IOInit(rx, OWNER_SERIAL_RX, RESOURCE_INDEX(device)); IOConfigGPIOAF(rx, IOCFG_AF_PP, uart->af); } diff --git a/src/main/target/ALIENFLIGHTF3/target.c b/src/main/target/ALIENFLIGHTF3/target.c index 8f1138043..213ce7114 100644 --- a/src/main/target/ALIENFLIGHTF3/target.c +++ b/src/main/target/ALIENFLIGHTF3/target.c @@ -25,7 +25,7 @@ #include "drivers/timer_def.h" const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { - // up to 10 Motor Outputs + // up to 10 Motor Outputs DEF_TIM(TIM15, CH2, PB15, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM1 - PB15 - DMA_NONE - TIM1_CH3N, TIM15_CH1N, *TIM15_CH2 DEF_TIM(TIM15, CH1, PB14, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM2 - PB14 - DMA1_CH5 - TIM1_CH2N, *TIM15_CH1 DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM3 - PA8 - DMA1_CH2 - *TIM1_CH1, TIM4_ETR diff --git a/src/main/target/ANYFCF7/stm32f7xx_hal_conf.h b/src/main/target/ANYFCF7/stm32f7xx_hal_conf.h index ec977fe6a..f2e5ffc8f 100644 --- a/src/main/target/ANYFCF7/stm32f7xx_hal_conf.h +++ b/src/main/target/ANYFCF7/stm32f7xx_hal_conf.h @@ -185,9 +185,9 @@ /* Section 2: PHY configuration section */ -/* DP83848_PHY_ADDRESS Address*/ +/* DP83848_PHY_ADDRESS Address*/ #define DP83848_PHY_ADDRESS 0x01U -/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ #define PHY_RESET_DELAY ((uint32_t)0x000000FFU) /* PHY Configuration delay */ #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) diff --git a/src/main/target/BLUEJAYF4/config.c b/src/main/target/BLUEJAYF4/config.c index ffcb7a3b7..00c3fc351 100644 --- a/src/main/target/BLUEJAYF4/config.c +++ b/src/main/target/BLUEJAYF4/config.c @@ -37,9 +37,9 @@ void targetConfiguration(master_t *config) } if (hardwareRevision == BJF4_MINI_REV3A || hardwareRevision == BJF4_REV1) { - intFeatureClear(FEATURE_SDCARD, &config->enabledFeatures); + intFeatureClear(FEATURE_SDCARD, &config->enabledFeatures); } - + if (hardwareRevision == BJF4_MINI_REV3A) { config->adcConfig.vbat.ioTag = IO_TAG(PA4); } @@ -50,7 +50,7 @@ void targetValidateConfiguration(master_t *config) /* make sure the SDCARD cannot be turned on */ if (hardwareRevision == BJF4_MINI_REV3A || hardwareRevision == BJF4_REV1) { intFeatureClear(FEATURE_SDCARD, &config->enabledFeatures); - + if (config->blackboxConfig.device == BLACKBOX_DEVICE_SDCARD) { config->blackboxConfig.device = BLACKBOX_DEVICE_FLASH; } diff --git a/src/main/target/FURYF3/target.c b/src/main/target/FURYF3/target.c index 501face97..ef74a7022 100644 --- a/src/main/target/FURYF3/target.c +++ b/src/main/target/FURYF3/target.c @@ -45,7 +45,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM8, CH1, PB6, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM5 - S2 DEF_TIM(TIM17, CH1, PB5, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM6 - S3 DEF_TIM(TIM16, CH1, PB4, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM7 - S4 - + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, TIMER_OUTPUT_ENABLED), // GPIO TIMER - LED_STRIP }; diff --git a/src/main/target/FURYF7/stm32f7xx_hal_conf.h b/src/main/target/FURYF7/stm32f7xx_hal_conf.h index ec977fe6a..f2e5ffc8f 100644 --- a/src/main/target/FURYF7/stm32f7xx_hal_conf.h +++ b/src/main/target/FURYF7/stm32f7xx_hal_conf.h @@ -185,9 +185,9 @@ /* Section 2: PHY configuration section */ -/* DP83848_PHY_ADDRESS Address*/ +/* DP83848_PHY_ADDRESS Address*/ #define DP83848_PHY_ADDRESS 0x01U -/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ #define PHY_RESET_DELAY ((uint32_t)0x000000FFU) /* PHY Configuration delay */ #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) diff --git a/src/main/target/KAKUTEF4/target.c b/src/main/target/KAKUTEF4/target.c index a4fa859d1..215a61646 100644 --- a/src/main/target/KAKUTEF4/target.c +++ b/src/main/target/KAKUTEF4/target.c @@ -31,7 +31,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { { TIM2, IO_TAG(PA3), TIM_Channel_4, 1, GPIO_AF_TIM2, DMA1_Stream6, DMA_Channel_3, DMA1_ST6_HANDLER }, // S3_OUT { TIM2, IO_TAG(PA2), TIM_Channel_3, 1, GPIO_AF_TIM2, DMA1_Stream1, DMA_Channel_3, DMA1_ST1_HANDLER }, // S4_OUT { TIM5, IO_TAG(PA1), TIM_Channel_2, 1, GPIO_AF_TIM5, DMA1_Stream4, DMA_Channel_6, DMA1_ST4_HANDLER }, // S5_OUT - { TIM8, IO_TAG(PC8), TIM_Channel_3, 1, GPIO_AF_TIM8, DMA2_Stream4, DMA_Channel_7, DMA2_ST4_HANDLER }, // S6_OUT + { TIM8, IO_TAG(PC8), TIM_Channel_3, 1, GPIO_AF_TIM8, DMA2_Stream4, DMA_Channel_7, DMA2_ST4_HANDLER }, // S6_OUT }; */ @@ -42,5 +42,5 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 1), // S3_OUT - DMA1_ST6 DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // S4_OUT - DMA1_ST1 DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // S5_OUT - DMA1_ST4 - DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 1), // S6_OUT - DMA2_ST4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 1), // S6_OUT - DMA2_ST4 }; \ No newline at end of file diff --git a/src/main/target/REVO/target.h b/src/main/target/REVO/target.h index 65de20090..23d2f5aa9 100644 --- a/src/main/target/REVO/target.h +++ b/src/main/target/REVO/target.h @@ -46,7 +46,7 @@ #define LED0 PB5 // Disable LED1, conflicts with AirbotF4/Flip32F4/Revolt beeper -#if defined(AIRBOTF4) +#if defined(AIRBOTF4) #define BEEPER PB4 #define BEEPER_INVERTED #elif defined(REVOLT) diff --git a/src/main/target/SPRACINGF3/target.h b/src/main/target/SPRACINGF3/target.h index c52da7b75..5c2ea8342 100644 --- a/src/main/target/SPRACINGF3/target.h +++ b/src/main/target/SPRACINGF3/target.h @@ -17,9 +17,9 @@ #pragma once -#ifdef RMDO +#ifdef RMDO #define TARGET_BOARD_IDENTIFIER "RMDO" -#else +#else #define TARGET_BOARD_IDENTIFIER "SRF3" #endif diff --git a/src/main/target/common.h b/src/main/target/common.h index 775ecf8dc..36a7333e9 100644 --- a/src/main/target/common.h +++ b/src/main/target/common.h @@ -28,7 +28,7 @@ #endif /**************************** - STM32 F4 specific settings. + STM32 F4 specific settings. ****************************/ #ifdef STM32F4 #define STM_FAST_TARGET