Merge pull request #1722 from martinbudden/bf_whitespace
Change tabs to spaces and remove trailing whitespace
This commit is contained in:
commit
a11ad509c6
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void adcInit(adcConfig_t *config)
|
|||
adcOperatingConfig[i].sampleTime = ADC_SampleTime_239Cycles5;
|
||||
adcOperatingConfig[i].enabled = true;
|
||||
}
|
||||
|
||||
|
||||
if (!adcActive) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
};
|
|
@ -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)
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef RMDO
|
||||
#ifdef RMDO
|
||||
#define TARGET_BOARD_IDENTIFIER "RMDO"
|
||||
#else
|
||||
#else
|
||||
#define TARGET_BOARD_IDENTIFIER "SRF3"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#endif
|
||||
|
||||
/****************************
|
||||
STM32 F4 specific settings.
|
||||
STM32 F4 specific settings.
|
||||
****************************/
|
||||
#ifdef STM32F4
|
||||
#define STM_FAST_TARGET
|
||||
|
|
Loading…
Reference in New Issue