mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
various: re-work designated initialisers to work with G++
G++ supports a more limited version of designated initialisers. Reorder fields to be in the right order. Make nested initialisers explicit. Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
parent
c1d1ef0ac9
commit
920cac5253
3 changed files with 29 additions and 32 deletions
|
@ -80,21 +80,21 @@ const mpu6050Config_t *selectMPU6050Config(void)
|
|||
// MPU_INT output on rev4 PB13
|
||||
static const mpu6050Config_t nazeRev4MPU6050Config = {
|
||||
.gpioAPB2Peripherals = RCC_APB2Periph_GPIOB,
|
||||
.gpioPort = GPIOB,
|
||||
.gpioPin = Pin_13,
|
||||
.gpioPort = GPIOB,
|
||||
.exti_port_source = GPIO_PortSourceGPIOB,
|
||||
.exti_pin_source = GPIO_PinSource13,
|
||||
.exti_line = EXTI_Line13,
|
||||
.exti_pin_source = GPIO_PinSource13,
|
||||
.exti_irqn = EXTI15_10_IRQn
|
||||
};
|
||||
// MPU_INT output on rev5 hardware PC13
|
||||
static const mpu6050Config_t nazeRev5MPU6050Config = {
|
||||
.gpioAPB2Peripherals = RCC_APB2Periph_GPIOC,
|
||||
.gpioPort = GPIOC,
|
||||
.gpioPin = Pin_13,
|
||||
.gpioPort = GPIOC,
|
||||
.exti_port_source = GPIO_PortSourceGPIOC,
|
||||
.exti_pin_source = GPIO_PinSource13,
|
||||
.exti_line = EXTI_Line13,
|
||||
.exti_pin_source = GPIO_PinSource13,
|
||||
.exti_irqn = EXTI15_10_IRQn
|
||||
};
|
||||
|
||||
|
@ -479,9 +479,6 @@ static void detectMag(magSensor_e magHardwareToUse)
|
|||
.gpioPin = Pin_12,
|
||||
.gpioPort = GPIOB,
|
||||
|
||||
.exti_port_source = 0,
|
||||
.exti_pin_source = 0
|
||||
|
||||
/* Disabled for v4 needs more work.
|
||||
.exti_port_source = GPIO_PortSourceGPIOB,
|
||||
.exti_pin_source = GPIO_PinSource12,
|
||||
|
@ -494,8 +491,8 @@ static void detectMag(magSensor_e magHardwareToUse)
|
|||
.gpioPin = Pin_14,
|
||||
.gpioPort = GPIOC,
|
||||
.exti_port_source = GPIO_PortSourceGPIOC,
|
||||
.exti_pin_source = GPIO_PinSource14,
|
||||
.exti_line = EXTI_Line14,
|
||||
.exti_pin_source = GPIO_PinSource14,
|
||||
.exti_irqn = EXTI15_10_IRQn
|
||||
};
|
||||
if (hardwareRevision < NAZE32_REV5) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue