Merge pull request #759 from martinbudden/bf_tidy_targets

Whitespace tidy of target.h files
This commit is contained in:
J Blackman 2016-07-16 12:43:53 +10:00 committed by GitHub
commit a0466d068e
13 changed files with 364 additions and 375 deletions

View File

@ -22,15 +22,13 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
// tqfp48 pin 34 // tqfp48 pin 34
#define LED0 PA13 #define LED0 PA13
// tqfp48 pin 37 // tqfp48 pin 37
#define LED1 PA14 #define LED1 PA14
// tqfp48 pin 38 // tqfp48 pin 38
#define LED2 PA15 #define LED2 PA15
#define BEEPER PB2 #define BEEPER PB2
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USE_SPI #define USE_SPI
@ -81,13 +79,13 @@
// #define USE_FAKE_GYRO // #define USE_FAKE_GYRO
#define USE_GYRO_MPU6500 #define USE_GYRO_MPU6500
#define USE_GYRO_SPI_MPU6500 #define USE_GYRO_SPI_MPU6500
#define GYRO_MPU6500_ALIGN CW270_DEG // ?? #define GYRO_MPU6500_ALIGN CW270_DEG // ??
#define ACC #define ACC
// #define USE_FAKE_ACC // #define USE_FAKE_ACC
#define USE_ACC_MPU6500 #define USE_ACC_MPU6500
#define USE_ACC_SPI_MPU6500 #define USE_ACC_SPI_MPU6500
#define ACC_MPU6500_ALIGN CW270_DEG // ?? #define ACC_MPU6500_ALIGN CW270_DEG // ??
#define BARO #define BARO
#define USE_BARO_BMP280 #define USE_BARO_BMP280
@ -100,20 +98,20 @@
#define USE_UART3 #define USE_UART3
#define SERIAL_PORT_COUNT 4 #define SERIAL_PORT_COUNT 4
#define UART1_TX_PIN PB6 #define UART1_TX_PIN PB6
#define UART1_RX_PIN PB7 #define UART1_RX_PIN PB7
#define UART2_TX_PIN PA2 #define UART2_TX_PIN PA2
#define UART2_RX_PIN PA3 #define UART2_RX_PIN PA3
#define UART3_TX_PIN PB10 #define UART3_TX_PIN PB10
#define UART3_RX_PIN PB11 #define UART3_RX_PIN PB11
#define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define ADC_INSTANCE ADC2 #define USE_ADC
#define VBAT_ADC_PIN PA4 #define ADC_INSTANCE ADC2
#define CURRENT_METER_ADC_PIN PA5 #define VBAT_ADC_PIN PA4
#define CURRENT_METER_ADC_PIN PA5
// mpu_int definition in sensors/initialisation.c // mpu_int definition in sensors/initialisation.c
#define USE_EXTI #define USE_EXTI
@ -135,19 +133,19 @@
#define WS2811_DMA_TC_FLAG DMA1_FLAG_TC3 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC3
#define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// Use UART3 for speksat // Use UART3 for speksat
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
// !!TODO - check the TARGET_IO_PORTs are correct // !!TODO - check the TARGET_IO_PORTs are correct
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15)) #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15))

View File

@ -19,21 +19,21 @@
#define TARGET_BOARD_IDENTIFIER "EUF1" #define TARGET_BOARD_IDENTIFIER "EUF1"
#define LED0 PB3 // PB3 (LED) #define LED0 PB3
#define LED1 PB4 // PB4 (LED) #define LED1 PB4
#define INVERTER PB2 // PB2 (BOOT1) abused as inverter select GPIO #define INVERTER PB2 // PB2 (BOOT1) abused as inverter select GPIO
#define INVERTER_USART USART2 #define INVERTER_USART USART2
#define USE_EXTI #define USE_EXTI
#define MPU6000_CS_GPIO GPIOB #define MPU6000_CS_GPIO GPIOB
#define MPU6000_CS_PIN PB12 #define MPU6000_CS_PIN PB12
#define MPU6000_SPI_INSTANCE SPI2 #define MPU6000_SPI_INSTANCE SPI2
#define MPU6500_CS_GPIO_CLK_PERIPHERAL RCC_APB2Periph_GPIOB #define MPU6500_CS_GPIO_CLK_PERIPHERAL RCC_APB2Periph_GPIOB
#define MPU6500_CS_GPIO GPIOB #define MPU6500_CS_GPIO GPIOB
#define MPU6500_CS_PIN PB12 #define MPU6500_CS_PIN PB12
#define MPU6500_SPI_INSTANCE SPI2 #define MPU6500_SPI_INSTANCE SPI2
#define GYRO #define GYRO
#define USE_FAKE_GYRO #define USE_FAKE_GYRO
@ -44,7 +44,7 @@
#define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000
#define USE_GYRO_SPI_MPU6500 #define USE_GYRO_SPI_MPU6500
#define GYRO_MPU6050_ALIGN CW0_DEG #define GYRO_MPU6050_ALIGN CW0_DEG
#define ACC #define ACC
#define USE_FAKE_ACC #define USE_FAKE_ACC
@ -55,7 +55,7 @@
//#define USE_ACC_SPI_MPU6000 //#define USE_ACC_SPI_MPU6000
#define USE_ACC_SPI_MPU6500 #define USE_ACC_SPI_MPU6500
#define ACC_MPU6050_ALIGN CW0_DEG #define ACC_MPU6050_ALIGN CW0_DEG
#define BARO #define BARO
#define USE_BARO_MS5611 #define USE_BARO_MS5611
@ -66,7 +66,7 @@
#define USE_MAG_HMC5883 #define USE_MAG_HMC5883
#define USE_MAG_AK8975 #define USE_MAG_AK8975
#define MAG_AK8975_ALIGN CW180_DEG_FLIP #define MAG_AK8975_ALIGN CW180_DEG_FLIP
#define SONAR #define SONAR
#define SONAR_TRIGGER_PIN PB0 #define SONAR_TRIGGER_PIN PB0
@ -80,12 +80,12 @@
#define USE_UART2 #define USE_UART2
#define USE_SOFTSERIAL1 #define USE_SOFTSERIAL1
#define USE_SOFTSERIAL2 #define USE_SOFTSERIAL2
#define SERIAL_PORT_COUNT 4 #define SERIAL_PORT_COUNT 4
#define SOFTSERIAL_1_TIMER TIM3 #define SOFTSERIAL_1_TIMER TIM3
#define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
#define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
#define SOFTSERIAL_2_TIMER TIM3 #define SOFTSERIAL_2_TIMER TIM3
#define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
#define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
@ -104,14 +104,13 @@
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART2, PA3 // USART2, PA3
#define BIND_PIN PA3 #define BIND_PIN PA3
// IO - stm32f103RCT6 in 64pin package (TODO) // IO - stm32f103RCT6 in 64pin package (TODO)
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(0)|BIT(1)|BIT(2)) #define TARGET_IO_PORTD (BIT(0)|BIT(1)|BIT(2))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4))

View File

@ -20,46 +20,47 @@
#define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8) #define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
#define USBD_PRODUCT_STRING "Swift-Flyer F4BY" #define USBD_PRODUCT_STRING "Swift-Flyer F4BY"
#define LED0 PE3 // Blue LED #define LED0 PE3 // Blue LED
#define LED1 PE2 // Red LED #define LED1 PE2 // Red LED
#define LED2 PE1 // Blue LED #define LED2 PE1 // Blue LED
#define BEEPER PE5
#define INVERTER PD3 #define BEEPER PE5
#define INVERTER_USART USART6
#define INVERTER PD3
#define INVERTER_USART USART6
// MPU6000 interrupts // MPU6000 interrupts
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
#define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU data ready (mag disabled) #define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU data ready (mag disabled)
#define MPU_INT_EXTI PB0 #define MPU_INT_EXTI PB0
#define USE_EXTI #define USE_EXTI
#define MPU6000_CS_PIN PA4 #define MPU6000_CS_PIN PA4
#define MPU6000_SPI_INSTANCE SPI1 #define MPU6000_SPI_INSTANCE SPI1
#define ACC #define ACC
#define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_MPU6000
#define ACC_MPU6000_ALIGN CW90_DEG #define ACC_MPU6000_ALIGN CW90_DEG
#define GYRO #define GYRO
#define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000
#define GYRO_MPU6000_ALIGN CW90_DEG #define GYRO_MPU6000_ALIGN CW90_DEG
#define MAG #define MAG
#define USE_MAG_HMC5883 #define USE_MAG_HMC5883
#define MAG_HMC5883_ALIGN CW90_DEG #define MAG_HMC5883_ALIGN CW90_DEG
#define BARO #define BARO
#define USE_BARO_MS5611 #define USE_BARO_MS5611
#define USE_SDCARD #define USE_SDCARD
#define SDCARD_SPI_INSTANCE SPI2 #define SDCARD_SPI_INSTANCE SPI2
#define SDCARD_SPI_CS_PIN PE15 #define SDCARD_SPI_CS_PIN PE15
// SPI2 is on the APB1 bus whose clock runs at 84MHz. Divide to under 400kHz for init: // SPI2 is on the APB1 bus whose clock runs at 84MHz. Divide to under 400kHz for init:
#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 // 328kHz #define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 // 328kHz
@ -76,43 +77,41 @@
#define USABLE_TIMER_CHANNEL_COUNT 17 #define USABLE_TIMER_CHANNEL_COUNT 17
#define USE_VCP #define USE_VCP
#define VBUS_SENSING_PIN PA9 #define VBUS_SENSING_PIN PA9
#define USE_UART1 #define USE_UART1
#define UART1_RX_PIN PB7 #define UART1_RX_PIN PB7
#define UART1_TX_PIN PB6 #define UART1_TX_PIN PB6
#define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
#define USE_UART2 #define USE_UART2
#define UART2_RX_PIN PD6 #define UART2_RX_PIN PD6
#define UART2_TX_PIN PD5 #define UART2_TX_PIN PD5
#define USE_UART3 #define USE_UART3
#define UART3_RX_PIN PD9 #define UART3_RX_PIN PD9
#define UART3_TX_PIN PD8 #define UART3_TX_PIN PD8
#define USE_UART4 #define USE_UART4
#define UART4_RX_PIN PC11 #define UART4_RX_PIN PC11
#define UART4_TX_PIN PC10 #define UART4_TX_PIN PC10
//#define USE_UART5 - error in DMA!!! //#define USE_UART5 - error in DMA!!!
//#define UART5_RX_PIN PD2 //#define UART5_RX_PIN PD2
//#define UART5_TX_PIN PC12 //#define UART5_TX_PIN PC12
#define USE_UART6 #define USE_UART6
#define UART6_RX_PIN PC7 #define UART6_RX_PIN PC7
#define UART6_TX_PIN PC6 #define UART6_TX_PIN PC6
#define SERIAL_PORT_COUNT 6 //VCP, UART1, UART2, UART3, UART4, UART5, UART6
#define SERIAL_PORT_COUNT 6 //VCP, UART1, UART2, UART3, UART4, UART5, UART6
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_1 #define USE_SPI_DEVICE_1
#define SPI1_SCK_PIN PA5 #define SPI1_SCK_PIN PA5
#define SPI1_MISO_PIN PA6 #define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7 #define SPI1_MOSI_PIN PA7
#define SPI1_NSS_PIN NONE #define SPI1_NSS_PIN NONE
#define USE_SPI_DEVICE_2 #define USE_SPI_DEVICE_2
#define SPI2_NSS_PIN NONE #define SPI2_NSS_PIN NONE
@ -121,42 +120,41 @@
#define SPI2_MOSI_PIN PB15 #define SPI2_MOSI_PIN PB15
#define USE_SPI_DEVICE_3 #define USE_SPI_DEVICE_3
#define SPI3_NSS_PIN PA15 #define SPI3_NSS_PIN PA15
#define SPI3_SCK_PIN PB3 #define SPI3_SCK_PIN PB3
#define SPI3_MISO_PIN PB4 #define SPI3_MISO_PIN PB4
#define SPI3_MOSI_PIN PB5 #define SPI3_MOSI_PIN PB5
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_2) #define I2C_DEVICE (I2CDEV_2)
#define USE_I2C_PULLUP #define USE_I2C_PULLUP
#define I2C2_SCL PB10 #define I2C2_SCL PB10
#define I2C2_SDA PB11 #define I2C2_SDA PB11
#define USE_ADC #define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define VBAT_ADC_PIN PC3 #define VBAT_ADC_PIN PC3
#define CURRENT_METER_ADC_PIN PC2 #define CURRENT_METER_ADC_PIN PC2
#define RSSI_ADC_PIN PC1 #define RSSI_ADC_PIN PC1
#define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_ONESHOT125) #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_ONESHOT125)
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS #define SERIALRX_PROVIDER SERIALRX_SBUS
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// UART6, PC7 // UART6, PC7
#define BIND_PIN PC7 #define BIND_PIN PC7
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTD 0xffff
#define TARGET_IO_PORTE 0xffff #define TARGET_IO_PORTE 0xffff
#define USED_TIMERS ( TIM_N(1) |TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9)) #define USED_TIMERS ( TIM_N(1) |TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9))

View File

@ -21,13 +21,13 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
#define MPU_INT_EXTI PC4 #define MPU_INT_EXTI PC4
#define USE_EXTI #define USE_EXTI
#define CONFIG_PREFER_ACC_ON #define CONFIG_PREFER_ACC_ON
#define LED0 PC14 #define LED0 PC14
#define BEEPER PC15 #define BEEPER PC15
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU INT, SDCardDetect #define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU INT, SDCardDetect
@ -36,26 +36,25 @@
#define ENSURE_MPU_DATA_READY_IS_LOW #define ENSURE_MPU_DATA_READY_IS_LOW
#define GYRO #define GYRO
#define ACC
#define MPU6000_CS_PIN PA4 #define MPU6000_CS_PIN PA4
#define MPU6000_SPI_INSTANCE SPI1 #define MPU6000_SPI_INSTANCE SPI1
#define MPU6500_CS_PIN PA4
#define MPU6500_CS_PIN PA4 #define MPU6500_SPI_INSTANCE SPI1
#define MPU6500_SPI_INSTANCE SPI1
#define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000
#define GYRO_MPU6000_ALIGN CW180_DEG #define GYRO_MPU6000_ALIGN CW180_DEG
#define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_MPU6000
#define ACC_MPU6000_ALIGN CW180_DEG #define ACC_MPU6000_ALIGN CW180_DEG
#define USE_GYRO_MPU6500 #define USE_GYRO_MPU6500
#define USE_GYRO_SPI_MPU6500 #define USE_GYRO_SPI_MPU6500
#define GYRO_MPU6500_ALIGN CW90_DEG #define GYRO_MPU6500_ALIGN CW90_DEG
#define ACC
#define USE_ACC_MPU6500 #define USE_ACC_MPU6500
#define USE_ACC_SPI_MPU6500 #define USE_ACC_SPI_MPU6500
#define ACC_MPU6500_ALIGN CW90_DEG #define ACC_MPU6500_ALIGN CW90_DEG
#define BARO #define BARO
#define USE_BARO_MS5611 #define USE_BARO_MS5611
@ -113,31 +112,31 @@
#define USE_SOFTSERIAL1 #define USE_SOFTSERIAL1
#define SERIAL_PORT_COUNT 5 #define SERIAL_PORT_COUNT 5
#define UART1_TX_PIN PA9 // PA9 #define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10 // PA10 #define UART1_RX_PIN PA10
#define UART2_TX_PIN PA14 // PA14 #define UART2_TX_PIN PA14
#define UART2_RX_PIN PA15 // PA15 #define UART2_RX_PIN PA15
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11 // PB11 (AF7)
#define SOFTSERIAL_1_TIMER TIM3 #define SOFTSERIAL_1_TIMER TIM3
#define SOFTSERIAL_1_TIMER_RX_HARDWARE 1 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 1
#define SOFTSERIAL_1_TIMER_TX_HARDWARE 2 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 2
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // SDA (PB9/AF4), SCL (PB8/AF4) #define I2C_DEVICE (I2CDEV_1) // SDA (PB9/AF4), SCL (PB8/AF4)
#define I2C1_SCL_PIN PB8 #define I2C1_SCL_PIN PB8
#define I2C1_SDA_PIN PB9 #define I2C1_SDA_PIN PB9
#define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define ADC_INSTANCE ADC1 #define USE_ADC
#define VBAT_ADC_PIN PA0 #define ADC_INSTANCE ADC1
#define RSSI_ADC_PIN PA1 #define VBAT_ADC_PIN PA0
#define CURRENT_METER_ADC_PIN PA2 #define RSSI_ADC_PIN PA1
#define CURRENT_METER_ADC_PIN PA2
#define LED_STRIP #define LED_STRIP
@ -150,23 +149,23 @@
#define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
#define SONAR #define SONAR
#define SONAR_ECHO_PIN PB1 #define SONAR_ECHO_PIN PB1
#define SONAR_TRIGGER_PIN PB0 #define SONAR_TRIGGER_PIN PB0
#define DEFAULT_FEATURES FEATURE_BLACKBOX #define DEFAULT_FEATURES FEATURE_BLACKBOX
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3, // USART3,
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTD 0xffff
#define TARGET_IO_PORTF (BIT(4)) #define TARGET_IO_PORTF (BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(16) |TIM_N(17)) #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(16) |TIM_N(17))

View File

@ -20,44 +20,45 @@
#define TARGET_BOARD_IDENTIFIER "FYF4" #define TARGET_BOARD_IDENTIFIER "FYF4"
#define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8) #define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
#define USBD_PRODUCT_STRING "FuryF4" #define USBD_PRODUCT_STRING "FuryF4"
#define LED0 PB5 #define LED0 PB5
#define LED1 PB4 #define LED1 PB4
#define BEEPER PA8
#define BEEPER PA8
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define INVERTER PC0 // PC0 used as inverter select GPIO #define INVERTER PC0 // PC0 used as inverter select GPIO
#define INVERTER_USART USART1 #define INVERTER_USART USART1
#define MPU6000_CS_PIN PA4 #define MPU6000_CS_PIN PA4
#define MPU6000_SPI_INSTANCE SPI1 #define MPU6000_SPI_INSTANCE SPI1
#define MPU6500_CS_PIN PA4 #define MPU6500_CS_PIN PA4
#define MPU6500_SPI_INSTANCE SPI1 #define MPU6500_SPI_INSTANCE SPI1
#define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000
#define GYRO_MPU6000_ALIGN CW180_DEG #define GYRO_MPU6000_ALIGN CW180_DEG
#define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_MPU6000
#define ACC_MPU6000_ALIGN CW180_DEG #define ACC_MPU6000_ALIGN CW180_DEG
#define USE_GYRO_MPU6500 #define USE_GYRO_MPU6500
#define USE_GYRO_SPI_MPU6500 #define USE_GYRO_SPI_MPU6500
#define GYRO_MPU6500_ALIGN CW180_DEG #define GYRO_MPU6500_ALIGN CW180_DEG
#define USE_ACC_MPU6500 #define USE_ACC_MPU6500
#define USE_ACC_SPI_MPU6500 #define USE_ACC_SPI_MPU6500
#define ACC_MPU6500_ALIGN CW180_DEG #define ACC_MPU6500_ALIGN CW180_DEG
// MPU6000 interrupts // MPU6000 interrupts
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
#define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready (mag disabled) #define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready (mag disabled)
#define MPU_INT_EXTI PC4 #define MPU_INT_EXTI PC4
#define USE_EXTI #define USE_EXTI
#define BARO #define BARO
#define USE_BARO_MS5611 #define USE_BARO_MS5611
#define MS5611_I2C_INSTANCE I2CDEV_1 #define MS5611_I2C_INSTANCE I2CDEV_1
#define USE_SDCARD #define USE_SDCARD
@ -97,29 +98,29 @@
#define USE_FLASHFS #define USE_FLASHFS
#define USE_FLASH_M25P16 #define USE_FLASH_M25P16
#define M25P16_CS_PIN PB3 #define M25P16_CS_PIN PB3
#define M25P16_SPI_INSTANCE SPI3 #define M25P16_SPI_INSTANCE SPI3
#define USABLE_TIMER_CHANNEL_COUNT 5 #define USABLE_TIMER_CHANNEL_COUNT 5
#define USE_VCP #define USE_VCP
#define VBUS_SENSING_PIN PC5 #define VBUS_SENSING_PIN PC5
#define VBUS_SENSING_ENABLED #define VBUS_SENSING_ENABLED
#define USE_UART1 #define USE_UART1
#define UART1_RX_PIN PA10 #define UART1_RX_PIN PA10
#define UART1_TX_PIN PA9 #define UART1_TX_PIN PA9
#define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
#define USE_UART3 #define USE_UART3
#define UART3_RX_PIN PB11 #define UART3_RX_PIN PB11
#define UART3_TX_PIN PB10 #define UART3_TX_PIN PB10
#define USE_UART6 #define USE_UART6
#define UART6_RX_PIN PC7 #define UART6_RX_PIN PC7
#define UART6_TX_PIN PC6 #define UART6_TX_PIN PC6
#define SERIAL_PORT_COUNT 4 //VCP, USART1, USART3, USART6 #define SERIAL_PORT_COUNT 4 //VCP, USART1, USART3, USART6
#define USE_SPI #define USE_SPI
@ -138,16 +139,16 @@
#define SPI3_MOSI_PIN PC12 #define SPI3_MOSI_PIN PC12
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6-SCL, PB7-SDA #define I2C_DEVICE (I2CDEV_1) // PB6-SCL, PB7-SDA
#define USE_I2C_PULLUP #define USE_I2C_PULLUP
#define I2C1_SCL PB6 #define I2C1_SCL PB6
#define I2C1_SDA PB7 #define I2C1_SDA PB7
#define USE_ADC #define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define VBAT_ADC_PIN PC1 #define VBAT_ADC_PIN PC1
#define RSSI_ADC_GPIO_PIN PC2 #define RSSI_ADC_GPIO_PIN PC2
#define CURRENT_METER_ADC_PIN PC3 #define CURRENT_METER_ADC_PIN PC3
#define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_ONESHOT125) #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_ONESHOT125)
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
@ -157,14 +158,14 @@
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3 Rx, PB11 // USART3 Rx, PB11
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2)) #define TARGET_IO_PORTD (BIT(2))
#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(8) | TIM_N(9)) #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(8) | TIM_N(9))

View File

@ -21,7 +21,7 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE
#define LED0 PB3 #define LED0 PB3
#define USABLE_TIMER_CHANNEL_COUNT 17 #define USABLE_TIMER_CHANNEL_COUNT 17
@ -32,11 +32,11 @@
#define GYRO #define GYRO
#define USE_GYRO_MPU6050 #define USE_GYRO_MPU6050
#define GYRO_MPU6050_ALIGN CW270_DEG #define GYRO_MPU6050_ALIGN CW270_DEG
#define ACC #define ACC
#define USE_ACC_MPU6050 #define USE_ACC_MPU6050
#define ACC_MPU6050_ALIGN CW270_DEG #define ACC_MPU6050_ALIGN CW270_DEG
#define BARO #define BARO
#define USE_BARO_BMP085 #define USE_BARO_BMP085
@ -49,17 +49,17 @@
#define USE_UART3 #define USE_UART3
#define SERIAL_PORT_COUNT 3 #define SERIAL_PORT_COUNT 3
#define UART1_TX_PIN PA9 // PA9 #define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10 // PA10 #define UART1_RX_PIN PA10
#define UART2_TX_PIN PA14 // PA14 / SWCLK #define UART2_TX_PIN PA14
#define UART2_RX_PIN PA15 // PA15 #define UART2_RX_PIN PA15
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
@ -67,16 +67,16 @@
#define M25P16_CS_PIN PB12 #define M25P16_CS_PIN PB12
#define M25P16_SPI_INSTANCE SPI2 #define M25P16_SPI_INSTANCE SPI2
#define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define ADC_INSTANCE ADC2 #define USE_ADC
#define VBAT_ADC_PIN PA4 #define ADC_INSTANCE ADC2
#define CURRENT_METER_ADC_PIN PA5 #define VBAT_ADC_PIN PA4
#define RSSI_ADC_PIN PB2 #define CURRENT_METER_ADC_PIN PA5
#define RSSI_ADC_PIN PB2
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3, // USART3,
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
/* /*
@ -100,11 +100,10 @@
*/ */
// IO - stm32f303cc in 48pin package // IO - stm32f303cc in 48pin package
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))

View File

@ -23,51 +23,50 @@
#define SBUS_PORT_OPTIONS (SERIAL_STOPBITS_2 | SERIAL_PARITY_EVEN | SERIAL_INVERTED | SERIAL_BIDIR) #define SBUS_PORT_OPTIONS (SERIAL_STOPBITS_2 | SERIAL_PARITY_EVEN | SERIAL_INVERTED | SERIAL_BIDIR)
#define LED0 PB1 #define LED0 PB1
#define BEEPER PB13
#define BEEPER PB13
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USABLE_TIMER_CHANNEL_COUNT 12 #define USABLE_TIMER_CHANNEL_COUNT 12
#define USE_EXTI #define USE_EXTI
#define MPU_INT_EXTI PB2 #define MPU_INT_EXTI PB2
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
#define ENSURE_MPU_DATA_READY_IS_LOW #define ENSURE_MPU_DATA_READY_IS_LOW
#define GYRO #define GYRO
#define USE_GYRO_MPU6050 #define USE_GYRO_MPU6050
#define GYRO_MPU6050_ALIGN CW180_DEG #define GYRO_MPU6050_ALIGN CW180_DEG
#define ACC #define ACC
#define USE_ACC_MPU6050 #define USE_ACC_MPU6050
#define ACC_MPU6050_ALIGN CW180_DEG #define ACC_MPU6050_ALIGN CW180_DEG
#define USE_VCP #define USE_VCP
#define USE_UART1 #define USE_UART1
#define USE_UART2 #define USE_UART2
#define USE_UART3 #define USE_UART3
#define SERIAL_PORT_COUNT 4 #define SERIAL_PORT_COUNT 4
#define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10
#define UART1_TX_PIN PA9 // PA9 #define UART2_TX_PIN PB3
#define UART1_RX_PIN PA10 // PA10 #define UART2_RX_PIN PB4
#define UART2_TX_PIN PB3 #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART2_RX_PIN PB4 #define UART3_RX_PIN PB11 // PB11 (AF7)
#define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7)
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
#define USE_ADC #define USE_ADC
#define VBAT_SCALE_DEFAULT 160 #define VBAT_SCALE_DEFAULT 160
#define ADC_INSTANCE ADC1 #define ADC_INSTANCE ADC1
#define VBAT_ADC_PIN PA0 #define VBAT_ADC_PIN PA0
//#define CURRENT_METER_ADC_PIN PA5 //#define CURRENT_METER_ADC_PIN PA5
//#define RSSI_ADC_PIN PB2 //#define RSSI_ADC_PIN PB2
#define DEFAULT_FEATURES FEATURE_VBAT #define DEFAULT_FEATURES FEATURE_VBAT
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
@ -75,12 +74,12 @@
#define SERIALRX_UART SERIAL_PORT_USART2 #define SERIALRX_UART SERIAL_PORT_USART2
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
#define BIND_PIN PB4 #define BIND_PIN PB4
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTD 0xffff
#define TARGET_IO_PORTF (BIT(4)) #define TARGET_IO_PORTF (BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(15) | TIM_N(16) | TIM_N(17)) #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(15) | TIM_N(16) | TIM_N(17))

View File

@ -22,17 +22,17 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
#define LED0 PB5 // Blue LEDs - PB5 #define LED0 PB5 // Blue LEDs - PB5
//#define LED1 PB9 // Green LEDs - PB9 //#define LED1 PB9 // Green LEDs - PB9
#define BEEPER PA0 #define BEEPER PA0
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USABLE_TIMER_CHANNEL_COUNT 9 #define USABLE_TIMER_CHANNEL_COUNT 9
// MPU6050 interrupts // MPU6050 interrupts
#define USE_EXTI #define USE_EXTI
#define MPU_INT_EXTI PA15 #define MPU_INT_EXTI PA15
#define EXTI15_10_CALLBACK_HANDLER_COUNT 1 // MPU data ready #define EXTI15_10_CALLBACK_HANDLER_COUNT 1 // MPU data ready
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
//#define ENSURE_MPU_DATA_READY_IS_LOW //#define ENSURE_MPU_DATA_READY_IS_LOW
@ -41,20 +41,20 @@
#define ACC #define ACC
#define USE_GYRO_MPU6050 #define USE_GYRO_MPU6050
#define GYRO_MPU6050_ALIGN CW180_DEG #define GYRO_MPU6050_ALIGN CW180_DEG
#define USE_ACC_MPU6050 #define USE_ACC_MPU6050
#define ACC_MPU6050_ALIGN CW180_DEG #define ACC_MPU6050_ALIGN CW180_DEG
#define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000
#define GYRO_MPU6000_ALIGN CW180_DEG #define GYRO_MPU6000_ALIGN CW180_DEG
#define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_MPU6000
#define ACC_MPU6000_ALIGN CW180_DEG #define ACC_MPU6000_ALIGN CW180_DEG
#define MPU6000_CS_GPIO GPIOB #define MPU6000_CS_GPIO GPIOB
#define MPU6000_CS_PIN PB12 #define MPU6000_CS_PIN PB12
#define MPU6000_SPI_INSTANCE SPI2 #define MPU6000_SPI_INSTANCE SPI2
//#define BARO //#define BARO
//#define USE_BARO_MS5611 //#define USE_BARO_MS5611
@ -66,30 +66,30 @@
#define USE_UART1 #define USE_UART1
#define USE_UART2 #define USE_UART2
#define USE_UART3 #define USE_UART3
#define SERIAL_PORT_COUNT 4 #define SERIAL_PORT_COUNT 4
#define UART1_TX_PIN PB6 // PB6 #define UART1_TX_PIN PB6
#define UART1_RX_PIN PB7 // PB7 #define UART1_RX_PIN PB7
#define UART2_TX_PIN PB3 // PB3 #define UART2_TX_PIN PB3
#define UART2_RX_PIN PB4 // PB4 #define UART2_RX_PIN PB4
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11 // PB11 (AF7)
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_2) #define I2C_DEVICE (I2CDEV_2)
#define I2C2_SCL PA9 #define I2C2_SCL PA9
#define I2C2_SDA PA10 #define I2C2_SDA PA10
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_2 #define USE_SPI_DEVICE_2
#define M25P16_CS_PIN PB12 #define M25P16_CS_PIN PB12
#define M25P16_SPI_INSTANCE SPI2 #define M25P16_SPI_INSTANCE SPI2
//#define SENSORS_SET (SENSOR_ACC | SENSOR_BARO | SENSOR_GPS | SENSOR_MAG) //#define SENSORS_SET (SENSOR_ACC | SENSOR_BARO | SENSOR_GPS | SENSOR_MAG)
#define SENSORS_SET (SENSOR_ACC) #define SENSORS_SET (SENSOR_ACC)
#undef GPS #undef GPS
#define DISPLAY #define DISPLAY
@ -135,17 +135,17 @@
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART2, PB4 // USART2, PB4
#define BIND_PIN PB4 #define BIND_PIN PB4
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
// IO - stm32f303cc in 48pin package // IO - stm32f303cc in 48pin package
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
// #define TARGET_IO_PORTF (BIT(0)|BIT(1)) // #define TARGET_IO_PORTF (BIT(0)|BIT(1))
// !!TODO - check the following line is correct // !!TODO - check the following line is correct
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(17)) #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(17))

View File

@ -22,63 +22,63 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
#define LED0 PB9 #define LED0 PB9
#define LED1 PB5 #define LED1 PB5
#define BEEPER PA0 #define BEEPER PA0
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USABLE_TIMER_CHANNEL_COUNT 9 #define USABLE_TIMER_CHANNEL_COUNT 9
// MPU6000 interrupts // MPU6000 interrupts
#define USE_EXTI #define USE_EXTI
#define MPU_INT_EXTI PA15 #define MPU_INT_EXTI PA15
#define EXTI15_10_CALLBACK_HANDLER_COUNT 1 // MPU data ready #define EXTI15_10_CALLBACK_HANDLER_COUNT 1 // MPU data ready
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
#define GYRO #define GYRO
#define ACC
#define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000
#define GYRO_MPU6000_ALIGN CW180_DEG #define GYRO_MPU6000_ALIGN CW180_DEG
#define USE_ACC_SPI_MPU6000
#define ACC_MPU6000_ALIGN CW180_DEG
#define MPU6000_CS_GPIO GPIOB #define ACC
#define MPU6000_CS_PIN PB12 #define USE_ACC_SPI_MPU6000
#define MPU6000_SPI_INSTANCE SPI2 #define ACC_MPU6000_ALIGN CW180_DEG
#define MPU6000_CS_GPIO GPIOB
#define MPU6000_CS_PIN PB12
#define MPU6000_SPI_INSTANCE SPI2
#define USE_VCP #define USE_VCP
#define USE_UART1 #define USE_UART1
#define USE_UART2 #define USE_UART2
#define USE_UART3 #define USE_UART3
#define SERIAL_PORT_COUNT 4 #define SERIAL_PORT_COUNT 4
#define UART1_TX_PIN PB6 // PB6 #define UART1_TX_PIN PB6
#define UART1_RX_PIN PB7 // PB7 #define UART1_RX_PIN PB7
#define UART2_TX_PIN PB3 // PB3 #define UART2_TX_PIN PB3
#define UART2_RX_PIN PB4 // PB4 #define UART2_RX_PIN PB4
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11 // PB11 (AF7)
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_2 #define USE_SPI_DEVICE_2
#define SENSORS_SET (SENSOR_ACC) #define SENSORS_SET (SENSOR_ACC)
#define TELEMETRY #define TELEMETRY
#define BLACKBOX #define BLACKBOX
#define SERIAL_RX #define SERIAL_RX
#define USE_SERVOS #define USE_SERVOS
#define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define ADC_INSTANCE ADC2 #define USE_ADC
#define CURRENT_METER_ADC_PIN PA2 #define ADC_INSTANCE ADC2
#define VBAT_ADC_PIN PA5 #define CURRENT_METER_ADC_PIN PA2
#define RSSI_ADC_PIN PB2 #define VBAT_ADC_PIN PA5
#define RSSI_ADC_PIN PB2
#define LED_STRIP #define LED_STRIP
#if 1 #if 1
@ -124,16 +124,17 @@
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3, PB11 // USART3, PB11
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
// IO - stm32f303cc in 48pin package // IO - stm32f303cc in 48pin package
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
// #define TARGET_IO_PORTF (BIT(0)|BIT(1)) // #define TARGET_IO_PORTF (BIT(0)|BIT(1))
// !!TODO - check the following line is correct // !!TODO - check the following line is correct
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(17))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(17))

View File

@ -21,7 +21,7 @@
#define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8) #define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
#define USBD_PRODUCT_STRING "Revolution" #define USBD_PRODUCT_STRING "Revolution"
#ifdef OPBL #ifdef OPBL
#define USBD_SERIALNUMBER_STRING "0x8020000" #define USBD_SERIALNUMBER_STRING "0x8020000"
#endif #endif
@ -51,10 +51,10 @@
#define MAG #define MAG
#define USE_MAG_HMC5883 #define USE_MAG_HMC5883
#define MAG_HMC5883_ALIGN CW90_DEG #define MAG_HMC5883_ALIGN CW90_DEG
//#define USE_MAG_NAZA //#define USE_MAG_NAZA
//#define MAG_NAZA_ALIGN CW180_DEG_FLIP //#define MAG_NAZA_ALIGN CW180_DEG_FLIP
#define BARO #define BARO
#define USE_BARO_MS5611 #define USE_BARO_MS5611
@ -121,4 +121,4 @@
#define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTD 0xffff
#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9)) #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9) )

View File

@ -21,9 +21,9 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE
#define LED0 PB3 #define LED0 PB3
#define BEEPER PC15 #define BEEPER PC15
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USABLE_TIMER_CHANNEL_COUNT 17 #define USABLE_TIMER_CHANNEL_COUNT 17
@ -39,11 +39,11 @@
#define GYRO #define GYRO
#define USE_GYRO_MPU6050 #define USE_GYRO_MPU6050
#define GYRO_MPU6050_ALIGN CW270_DEG #define GYRO_MPU6050_ALIGN CW270_DEG
#define ACC #define ACC
#define USE_ACC_MPU6050 #define USE_ACC_MPU6050
#define ACC_MPU6050_ALIGN CW270_DEG #define ACC_MPU6050_ALIGN CW270_DEG
#define BARO #define BARO
#define USE_BARO_BMP280 #define USE_BARO_BMP280
@ -52,34 +52,34 @@
#define USE_FLASH_M25P16 #define USE_FLASH_M25P16
#define SONAR #define SONAR
#define SONAR_ECHO_PIN PB1 #define SONAR_ECHO_PIN PB1
#define SONAR_TRIGGER_PIN PB0 #define SONAR_TRIGGER_PIN PB0
#define USE_UART1 #define USE_UART1
#define USE_UART2 #define USE_UART2
#define USE_UART3 #define USE_UART3
#define USE_SOFTSERIAL1 #define USE_SOFTSERIAL1
#define USE_SOFTSERIAL2 #define USE_SOFTSERIAL2
#define SERIAL_PORT_COUNT 5 #define SERIAL_PORT_COUNT 5
#define UART1_TX_PIN PA9 // PA9 #define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10 // PA10 #define UART1_RX_PIN PA10
#define UART2_TX_PIN PA14 // PA14 / SWCLK #define UART2_TX_PIN PA14 // PA14 / SWCLK
#define UART2_RX_PIN PA15 // PA15 #define UART2_RX_PIN PA15 // PA15
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11 // PB11 (AF7)
#define SOFTSERIAL_1_TIMER TIM3 #define SOFTSERIAL_1_TIMER TIM3
#define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
#define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
#define SOFTSERIAL_2_TIMER TIM3 #define SOFTSERIAL_2_TIMER TIM3
#define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
#define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
@ -109,15 +109,15 @@
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3, // USART3,
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
// IO - stm32f303cc in 48pin package // IO - stm32f303cc in 48pin package
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))

View File

@ -21,9 +21,9 @@
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
#define LED0 PB8 #define LED0 PB8
#define BEEPER PC15 #define BEEPER PC15
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USABLE_TIMER_CHANNEL_COUNT 12 // PPM, 8 PWM, UART3 RX/TX, LED Strip #define USABLE_TIMER_CHANNEL_COUNT 12 // PPM, 8 PWM, UART3 RX/TX, LED Strip
@ -31,7 +31,7 @@
#define EXTI15_10_CALLBACK_HANDLER_COUNT 2 // MPU_INT, SDCardDetect #define EXTI15_10_CALLBACK_HANDLER_COUNT 2 // MPU_INT, SDCardDetect
#define USE_EXTI #define USE_EXTI
#define MPU_INT_EXTI PC13 #define MPU_INT_EXTI PC13
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
#define ENSURE_MPU_DATA_READY_IS_LOW #define ENSURE_MPU_DATA_READY_IS_LOW
@ -47,8 +47,8 @@
#define USE_ACC_MPU6500 #define USE_ACC_MPU6500
#define USE_ACC_SPI_MPU6500 #define USE_ACC_SPI_MPU6500
#define ACC_MPU6500_ALIGN CW180_DEG #define ACC_MPU6500_ALIGN CW180_DEG
#define GYRO_MPU6500_ALIGN CW180_DEG #define GYRO_MPU6500_ALIGN CW180_DEG
#define BARO #define BARO
#define USE_BARO_BMP280 #define USE_BARO_BMP280
@ -68,19 +68,19 @@
#define USE_UART1 #define USE_UART1
#define USE_UART2 #define USE_UART2
#define USE_UART3 #define USE_UART3
#define SERIAL_PORT_COUNT 4 #define SERIAL_PORT_COUNT 4
#define UART1_TX_PIN PA9 // PA9 #define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10 // PA10 #define UART1_RX_PIN PA10
#define UART2_TX_PIN PA14 // PA14 / SWCLK #define UART2_TX_PIN PA14 // PA14 / SWCLK
#define UART2_RX_PIN PA15 // PA15 #define UART2_RX_PIN PA15
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11 // PB11 (AF7)
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_1 // PB9,3,4,5 on AF5 SPI1 (MPU) #define USE_SPI_DEVICE_1 // PB9,3,4,5 on AF5 SPI1 (MPU)
@ -148,21 +148,20 @@
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
#define DEFAULT_FEATURES (FEATURE_TRANSPONDER | FEATURE_BLACKBOX | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_TELEMETRY) #define DEFAULT_FEATURES (FEATURE_TRANSPONDER | FEATURE_BLACKBOX | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_TELEMETRY)
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3, // USART3,
#define BIND_PIN PB11 #define BIND_PIN PB11
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
// IO - stm32f303cc in 48pin package // IO - stm32f303cc in 48pin package
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) | TIM_N(15))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) | TIM_N(15))

View File

@ -24,9 +24,9 @@
// early prototype had slightly different pin mappings. // early prototype had slightly different pin mappings.
//#define SPRACINGF3MINI_MKII_REVA //#define SPRACINGF3MINI_MKII_REVA
#define LED0 PB3 #define LED0 PB3
#define BEEPER PC15 #define BEEPER PC15
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define USABLE_TIMER_CHANNEL_COUNT 12 // 8 Outputs; PPM; LED Strip; 2 additional PWM pins also on UART3 RX/TX pins. #define USABLE_TIMER_CHANNEL_COUNT 12 // 8 Outputs; PPM; LED Strip; 2 additional PWM pins also on UART3 RX/TX pins.
@ -34,24 +34,22 @@
#define EXTI15_10_CALLBACK_HANDLER_COUNT 2 // MPU_INT, SDCardDetect #define EXTI15_10_CALLBACK_HANDLER_COUNT 2 // MPU_INT, SDCardDetect
#define USE_EXTI #define USE_EXTI
#define MPU_INT_EXTI PC13 #define MPU_INT_EXTI PC13
#define USE_MPU_DATA_READY_SIGNAL #define USE_MPU_DATA_READY_SIGNAL
#define ENSURE_MPU_DATA_READY_IS_LOW #define ENSURE_MPU_DATA_READY_IS_LOW
#define USE_MAG_DATA_READY_SIGNAL #define USE_MAG_DATA_READY_SIGNAL
#define ENSURE_MAG_DATA_READY_IS_HIGH #define ENSURE_MAG_DATA_READY_IS_HIGH
#define GYRO #define GYRO
//#define USE_FAKE_GYRO //#define USE_FAKE_GYRO
#define USE_GYRO_MPU6500 #define USE_GYRO_MPU6500
#define GYRO_MPU6500_ALIGN CW180_DEG
#define ACC #define ACC
//#define USE_FAKE_ACC //#define USE_FAKE_ACC
#define USE_ACC_MPU6500 #define USE_ACC_MPU6500
#define ACC_MPU6500_ALIGN CW180_DEG
#define ACC_MPU6500_ALIGN CW180_DEG
#define GYRO_MPU6500_ALIGN CW180_DEG
#define BARO #define BARO
#define USE_BARO_BMP280 #define USE_BARO_BMP280
@ -60,40 +58,39 @@
#define USE_MPU9250_MAG // Enables bypass configuration #define USE_MPU9250_MAG // Enables bypass configuration
#define USE_MAG_AK8975 #define USE_MAG_AK8975
#define USE_MAG_HMC5883 // External #define USE_MAG_HMC5883 // External
#define MAG_AK8975_ALIGN CW90_DEG_FLIP
#define MAG_AK8975_ALIGN CW90_DEG_FLIP
#define SONAR #define SONAR
#define SONAR_ECHO_PIN PB1 #define SONAR_ECHO_PIN PB1
#define SONAR_TRIGGER_PIN PB0 #define SONAR_TRIGGER_PIN PB0
#define USB_IO #define USB_IO
#define USB_CABLE_DETECTION #define USB_CABLE_DETECTION
#define USB_DETECT_PIN PB5 #define USB_DETECT_PIN PB5
#define USE_VCP #define USE_VCP
#define USE_UART1 #define USE_UART1
#define USE_UART2 #define USE_UART2
#define USE_UART3 #define USE_UART3
#define USE_SOFTSERIAL1 #define USE_SOFTSERIAL1
#define SERIAL_PORT_COUNT 5 #define SERIAL_PORT_COUNT 5
#define UART1_TX_PIN PA9 // PA9 #define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10 // PA10 #define UART1_RX_PIN PA10
#define UART2_TX_PIN PA14 // PA14 / SWCLK #define UART2_TX_PIN PA14 // PA14 / SWCLK
#define UART2_RX_PIN PA15 // PA15 #define UART2_RX_PIN PA15
#define UART3_TX_PIN PB10 // PB10 (AF7) #define UART3_TX_PIN PB10 // PB10 (AF7)
#define UART3_RX_PIN PB11 // PB11 (AF7) #define UART3_RX_PIN PB11 // PB11 (AF7)
#define SOFTSERIAL_1_TIMER TIM2 #define SOFTSERIAL_1_TIMER TIM2
#define SOFTSERIAL_1_TIMER_RX_HARDWARE 9 // PA0 / PAD3 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 9 // PA0 / PAD3
#define SOFTSERIAL_1_TIMER_TX_HARDWARE 10 // PA1 / PAD4 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 10 // PA1 / PAD4
#define USE_I2C #define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
@ -124,10 +121,8 @@
// Performance logging for SD card operations: // Performance logging for SD card operations:
// #define AFATFS_USE_INTROSPECTIVE_LOGGING // #define AFATFS_USE_INTROSPECTIVE_LOGGING
#define USE_ADC
#define BOARD_HAS_VOLTAGE_DIVIDER #define BOARD_HAS_VOLTAGE_DIVIDER
#define USE_ADC
#define ADC_INSTANCE ADC2 #define ADC_INSTANCE ADC2
#define VBAT_ADC_PIN PA4 #define VBAT_ADC_PIN PA4
#define CURRENT_METER_ADC_PIN PA5 #define CURRENT_METER_ADC_PIN PA5
@ -141,7 +136,6 @@
#define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2
#define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
#define TRANSPONDER #define TRANSPONDER
#define TRANSPONDER_GPIO GPIOA #define TRANSPONDER_GPIO GPIOA
#define TRANSPONDER_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA #define TRANSPONDER_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
@ -158,27 +152,29 @@
#define REDUCE_TRANSPONDER_CURRENT_DRAW_WHEN_USB_CABLE_PRESENT #define REDUCE_TRANSPONDER_CURRENT_DRAW_WHEN_USB_CABLE_PRESENT
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
#define DEFAULT_FEATURES FEATURE_BLACKBOX #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
#define DEFAULT_FEATURES FEATURE_BLACKBOX
#define BUTTONS #define BUTTONS
#define BUTTON_A_PORT GPIOB #define BUTTON_A_PORT GPIOB
#define BUTTON_A_PIN Pin_1 #define BUTTON_A_PIN Pin_1
#define BUTTON_B_PORT GPIOB #define BUTTON_B_PORT GPIOB
#define BUTTON_B_PIN Pin_0 #define BUTTON_B_PIN Pin_0
#define SPEKTRUM_BIND #define SPEKTRUM_BIND
// USART3, // USART3,
#define BIND_PIN PB11 #define BIND_PIN PB11
#define HARDWARE_BIND_PLUG #define HARDWARE_BIND_PLUG
#define BINDPLUG_PIN PB0 #define BINDPLUG_PIN PB0
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))