diff --git a/configs/KAKUTEF4/config.h b/configs/KAKUTEF4/config.h index 653a3e47..8ee5ef92 100644 --- a/configs/KAKUTEF4/config.h +++ b/configs/KAKUTEF4/config.h @@ -32,8 +32,6 @@ #define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_ICM20689 #define USE_ACC_SPI_ICM20689 -#define USE_BARO -#define USE_BARO_BMP280 #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 @@ -74,26 +72,24 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PC7 , 2, 0) \ - TIMER_PIN_MAP( 1, PB0 , 2, 0) \ - TIMER_PIN_MAP( 2, PB1 , 2, 0) \ - TIMER_PIN_MAP( 3, PA3 , 1, 1) \ - TIMER_PIN_MAP( 4, PA2 , 1, 0) \ - TIMER_PIN_MAP( 5, PA0 , 2, 0) \ - TIMER_PIN_MAP( 6, PC8 , 2, 1) \ - TIMER_PIN_MAP( 7, PA1 , 2, 0) - - -#define ADC1_DMA_OPT 0 + TIMER_PIN_MAP( 0, RX_PPM_PIN, 2, -1) \ + TIMER_PIN_MAP( 1, MOTOR1_PIN, 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN, 2, 0) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN, 1, 1) \ + TIMER_PIN_MAP( 4, MOTOR4_PIN, 1, 0) \ + TIMER_PIN_MAP( 5, MOTOR5_PIN, 2, 0) \ + TIMER_PIN_MAP( 6, MOTOR6_PIN, 2, 1) \ + TIMER_PIN_MAP( 7, LED_STRIP_PIN, 2, 0) +#define ADC1_DMA_OPT 0 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 275 +#define DEFAULT_CURRENT_METER_SCALE 275 #define BEEPER_INVERTED -#define SYSTEM_HSE_MHZ 8 -#define MAX7456_SPI_INSTANCE SPI3 +#define SYSTEM_HSE_MHZ 8 +#define MAX7456_SPI_INSTANCE SPI3 //TODO #define MAX7456_PREINIT_OPU ON -#define FLASH_SPI_INSTANCE SPI3 -#define GYRO_1_SPI_INSTANCE SPI1 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_1_ALIGN_YAW 2700 +#define FLASH_SPI_INSTANCE SPI3 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN_YAW 2700 diff --git a/configs/KAKUTEF4V2/config.h b/configs/KAKUTEF4V2/config.h index 3ed086ee..50c2ca87 100644 --- a/configs/KAKUTEF4V2/config.h +++ b/configs/KAKUTEF4V2/config.h @@ -32,7 +32,9 @@ #define USE_GYRO_SPI_MPU6000 #define USE_GYRO_SPI_ICM20689 #define USE_ACC_SPI_ICM20689 +#define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 @@ -76,30 +78,27 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PC7 , 2, 0) \ - TIMER_PIN_MAP( 1, PB0 , 2, 0) \ - TIMER_PIN_MAP( 2, PB1 , 2, 0) \ - TIMER_PIN_MAP( 3, PA3 , 1, 1) \ - TIMER_PIN_MAP( 4, PA2 , 1, 0) \ - TIMER_PIN_MAP( 5, PC8 , 2, 0) - + TIMER_PIN_MAP( 0, RX_PPM_PIN, 2, -1) \ + TIMER_PIN_MAP( 1, MOTOR1_PIN, 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN, 2, 0) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN, 1, 1) \ + TIMER_PIN_MAP( 4, MOTOR4_PIN, 1, 0) \ + TIMER_PIN_MAP( 5, LED_STRIP_PIN, 2, 0) -#define ADC1_DMA_OPT 1 +#define ADC1_DMA_OPT 1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 275 +#define DEFAULT_CURRENT_METER_SCALE 275 #define BEEPER_INVERTED //TODO #define TLM_INVERTED ON //TODO #define TLM_HALFDUPLEX OFF -#define SYSTEM_HSE_MHZ 8 -#define MAX7456_SPI_INSTANCE SPI3 +#define SYSTEM_HSE_MHZ 8 +#define MAX7456_SPI_INSTANCE SPI3 //TODO #define MAX7456_PREINIT_OPU ON -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define FLASH_SPI_INSTANCE SPI3 -#define GYRO_1_SPI_INSTANCE SPI1 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_2_SPI_INSTANCE SPI1 +#define FLASH_SPI_INSTANCE SPI3 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_2_SPI_INSTANCE SPI1 diff --git a/configs/KAKUTEF4WING/config.h b/configs/KAKUTEF4WING/config.h index 8831a910..301d0769 100644 --- a/configs/KAKUTEF4WING/config.h +++ b/configs/KAKUTEF4WING/config.h @@ -93,13 +93,12 @@ TIMER_PIN_MAP( 5, SERVO4_PIN , 2, -1) \ TIMER_PIN_MAP( 6, LED_STRIP_PIN, 1, 0) - #define ADC1_DMA_OPT 1 -#define MIXER_MODE MIXER_FLYING_WING +#define MIXER_MODE MIXER_FLYING_WING -#define MAG_I2C_INSTANCE (I2CDEV_2) -#define BARO_I2C_INSTANCE (I2CDEV_2) +#define MAG_I2C_INSTANCE I2CDEV_2 +#define BARO_I2C_INSTANCE I2CDEV_2 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH #define SERIALRX_UART SERIAL_PORT_USART3 diff --git a/configs/KAKUTEF7/config.h b/configs/KAKUTEF7/config.h index 90312ea3..a45e4807 100644 --- a/configs/KAKUTEF7/config.h +++ b/configs/KAKUTEF7/config.h @@ -32,7 +32,9 @@ #define USE_ACC_SPI_ICM20689 #define USE_GYRO_SPI_MPU6000 #define USE_ACC_SPI_MPU6000 +#define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_MAX7456 #define USE_SDCARD @@ -79,33 +81,29 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PE13, 1, 1) \ - TIMER_PIN_MAP( 1, PB0 , 2, 0) \ - TIMER_PIN_MAP( 2, PB1 , 2, 0) \ - TIMER_PIN_MAP( 3, PE9 , 1, 2) \ - TIMER_PIN_MAP( 4, PE11, 1, 1) \ - TIMER_PIN_MAP( 5, PC9 , 2, 0) \ - TIMER_PIN_MAP( 6, PA3 , 2, 0) \ - TIMER_PIN_MAP( 7, PD12, 1, 0) + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 1) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 0) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 0) \ + TIMER_PIN_MAP( 6, LED_STRIP_PIN, 1, 0) +#define SPI1_TX_DMA_OPT 1 +#define ADC1_DMA_OPT 1 -#define SPI1_TX_DMA_OPT 1 -#define ADC1_DMA_OPT 1 +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) -#define DEFAULT_BARO_DEVICE BARO_BMP280 -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 275 +#define DEFAULT_CURRENT_METER_SCALE 275 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define BEEPER_INVERTED #define SDCARD_DETECT_INVERTED #define USE_SDCARD_SPI -#define SDCARD_SPI_INSTANCE SPI1 -#define MAX7456_SPI_INSTANCE SPI2 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define GYRO_1_SPI_INSTANCE SPI4 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_2_SPI_INSTANCE SPI4 +#define SDCARD_SPI_INSTANCE SPI1 +#define MAX7456_SPI_INSTANCE SPI2 +#define GYRO_1_SPI_INSTANCE SPI4 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_2_SPI_INSTANCE SPI4 diff --git a/configs/KAKUTEF7HDV/config.h b/configs/KAKUTEF7HDV/config.h index b99eef8f..677a389e 100644 --- a/configs/KAKUTEF7HDV/config.h +++ b/configs/KAKUTEF7HDV/config.h @@ -30,7 +30,9 @@ #define USE_ACC_SPI_MPU6000 #define USE_GYRO #define USE_GYRO_SPI_MPU6000 +#define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_SDCARD #define BEEPER_PIN PD15 @@ -76,33 +78,28 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PE13, 1, 1) \ - TIMER_PIN_MAP( 1, PB0 , 2, 0) \ - TIMER_PIN_MAP( 2, PB1 , 2, 0) \ - TIMER_PIN_MAP( 3, PE9 , 1, 2) \ - TIMER_PIN_MAP( 4, PE11, 1, 1) \ - TIMER_PIN_MAP( 5, PC9 , 2, 0) \ - TIMER_PIN_MAP( 6, PA3 , 2, 0) \ - TIMER_PIN_MAP( 7, PD12, 1, 0) - + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 1) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 0) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 0) \ + TIMER_PIN_MAP( 6, LED_STRIP_PIN, 1, 0) -#define SPI1_TX_DMA_OPT 1 -#define ADC1_DMA_OPT 1 +#define SPI1_TX_DMA_OPT 1 +#define ADC1_DMA_OPT 1 +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) -#define DEFAULT_BARO_DEVICE BARO_BMP280 -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 275 +#define DEFAULT_CURRENT_METER_SCALE 275 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define BEEPER_INVERTED #define SDCARD_DETECT_INVERTED #define USE_SDCARD_SPI -#define SDCARD_SPI_INSTANCE SPI1 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define GYRO_1_SPI_INSTANCE SPI4 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_2_SPI_INSTANCE SPI4 +#define SDCARD_SPI_INSTANCE SPI1 +#define GYRO_1_SPI_INSTANCE SPI4 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_2_SPI_INSTANCE SPI4 diff --git a/configs/KAKUTEF7MINI/config.h b/configs/KAKUTEF7MINI/config.h index 5fcf6b2f..1b3ef364 100644 --- a/configs/KAKUTEF7MINI/config.h +++ b/configs/KAKUTEF7MINI/config.h @@ -34,6 +34,7 @@ #define USE_GYRO_SPI_ICM20689 #define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 @@ -81,29 +82,27 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PE13, 1, 1) \ - TIMER_PIN_MAP( 1, PB0 , 2, 0) \ - TIMER_PIN_MAP( 2, PB1 , 2, 0) \ - TIMER_PIN_MAP( 3, PE9 , 1, 2) \ - TIMER_PIN_MAP( 4, PE11, 1, 1) \ - TIMER_PIN_MAP( 5, PC9 , 2, 0) \ - TIMER_PIN_MAP( 6, PA3 , 2, 0) \ - TIMER_PIN_MAP( 7, PD12, 1, 0) \ - TIMER_PIN_MAP( 8, PB3 , 1, 0) + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 1) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 0) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 0) \ + TIMER_PIN_MAP( 6, LED_STRIP_PIN , 1, 0) \ + TIMER_PIN_MAP( 7, CAMERA_CONTROL_PIN, 1, -1) #define ADC1_DMA_OPT 1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define MAG_HARDWARE NONE -#define BARO_I2C_INSTANCE (I2CDEV_1) -#define BARO_HARDWARE BMP280 + +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 + #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define DEFAULT_CURRENT_METER_SCALE 275 #define BEEPER_INVERTED #define MAX7456_SPI_INSTANCE SPI2 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) #define FLASH_SPI_INSTANCE SPI1 #define GYRO_1_SPI_INSTANCE SPI4 #define GYRO_1_ALIGN CW270_DEG diff --git a/configs/KAKUTEF7MINIV3/config.h b/configs/KAKUTEF7MINIV3/config.h index fb88e524..b12a7dca 100644 --- a/configs/KAKUTEF7MINIV3/config.h +++ b/configs/KAKUTEF7MINIV3/config.h @@ -34,6 +34,7 @@ #define USE_GYRO_SPI_ICM42688P #define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 @@ -80,30 +81,27 @@ #define CAMERA_CONTROL_PIN PB3 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PB4 , 1, 0) \ - TIMER_PIN_MAP( 1, PB5 , 1, 0) \ - TIMER_PIN_MAP( 2, PB0 , 2, 0) \ - TIMER_PIN_MAP( 3, PB1 , 2, 0) \ - TIMER_PIN_MAP( 4, PB3 , 1, 0) \ - TIMER_PIN_MAP( 5, PB6 , 1, 0) \ - TIMER_PIN_MAP( 6, PB7 , 1, 0) \ - TIMER_PIN_MAP( 7, PA8 , 1, 2) \ - TIMER_PIN_MAP( 8, PA3 , 3, -1) + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 0) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 0) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 1, 0) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 1, 0) \ + TIMER_PIN_MAP( 6, CAMERA_CONTROL_PIN, 1, -1) \ + TIMER_PIN_MAP( 7, LED_STRIP_PIN , 1, 2) +#define ADC1_DMA_OPT 1 -#define ADC1_DMA_OPT 1 +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define BARO_I2C_INSTANCE (I2CDEV_1) -#define DEFAULT_BARO_DEVICE BARO_BMP280 -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH -#define DEFAULT_DSHOT_BURST DSHOT_DMAR_ON +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH +#define DEFAULT_DSHOT_BURST DSHOT_DMAR_ON #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 275 +#define DEFAULT_CURRENT_METER_SCALE 275 #define BEEPER_INVERTED -#define MAX7456_SPI_INSTANCE SPI3 -#define FLASH_SPI_INSTANCE SPI2 -#define GYRO_1_SPI_INSTANCE SPI1 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_2_SPI_INSTANCE SPI1 +#define MAX7456_SPI_INSTANCE SPI3 +#define FLASH_SPI_INSTANCE SPI2 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG diff --git a/configs/KAKUTEF7V2/config.h b/configs/KAKUTEF7V2/config.h index 16da9d8f..c81d32e5 100644 --- a/configs/KAKUTEF7V2/config.h +++ b/configs/KAKUTEF7V2/config.h @@ -32,7 +32,9 @@ #define USE_GYRO_SPI_ICM20689 #define USE_ACC_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000 +#define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_MAX7456 #define USE_SDCARD @@ -43,7 +45,6 @@ #define MOTOR4_PIN PE11 #define MOTOR5_PIN PC9 #define MOTOR6_PIN PA3 -#define RX_PPM_PIN PE13 #define LED_STRIP_PIN PD12 #define UART1_TX_PIN PA9 #define UART2_TX_PIN PD5 @@ -80,31 +81,29 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PE13, 1, 1) \ - TIMER_PIN_MAP( 1, PB0 , 2, 0) \ - TIMER_PIN_MAP( 2, PB1 , 2, 0) \ - TIMER_PIN_MAP( 3, PE9 , 1, 2) \ - TIMER_PIN_MAP( 4, PE11, 1, 1) \ - TIMER_PIN_MAP( 5, PC9 , 2, 0) \ - TIMER_PIN_MAP( 6, PA3 , 2, 0) \ - TIMER_PIN_MAP( 7, PD12, 1, 0) + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 0) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 1) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 0) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 0) \ + TIMER_PIN_MAP( 6, LED_STRIP_PIN , 1, 0) \ + TIMER_PIN_MAP( 7, CAMERA_CONTROL_PIN, 1, -1) +#define SPI1_TX_DMA_OPT 1 +#define ADC1_DMA_OPT 1 -#define SPI1_TX_DMA_OPT 1 -#define ADC1_DMA_OPT 1 +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define BEEPER_INVERTED #define SDCARD_DETECT_INVERTED #define USE_SDCARD_SPI -#define SDCARD_SPI_INSTANCE SPI1 -#define MAX7456_SPI_INSTANCE SPI2 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define GYRO_1_SPI_INSTANCE SPI4 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_1_ALIGN_YAW 2700 +#define SDCARD_SPI_INSTANCE SPI1 +#define MAX7456_SPI_INSTANCE SPI2 +#define GYRO_1_SPI_INSTANCE SPI4 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN_YAW 2700 diff --git a/configs/KAKUTEG4AIO/config.h b/configs/KAKUTEG4AIO/config.h index 1bd167eb..eabf7991 100644 --- a/configs/KAKUTEG4AIO/config.h +++ b/configs/KAKUTEG4AIO/config.h @@ -77,12 +77,12 @@ #define GYRO_1_EXTI_PIN PC4 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, LED_STRIP_PIN , 3, 12) \ - TIMER_PIN_MAP( 1, MOTOR4_PIN , 1, 1) \ - TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 2) \ - TIMER_PIN_MAP( 3, MOTOR3_PIN , 2, 3) \ - TIMER_PIN_MAP( 4, MOTOR1_PIN , 2, 4) \ - TIMER_PIN_MAP( 5, CAMERA_CONTROL_PIN , 1, 5) + TIMER_PIN_MAP( 0, LED_STRIP_PIN , 3, 12) \ + TIMER_PIN_MAP( 1, MOTOR4_PIN , 1, 1) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN , 2, 3) \ + TIMER_PIN_MAP( 4, MOTOR1_PIN , 2, 4) \ + TIMER_PIN_MAP( 5, CAMERA_CONTROL_PIN , 1, -1) #define ADC1_DMA_OPT 10 #define ADC2_DMA_OPT 11 @@ -94,8 +94,10 @@ #define SPI2_TX_DMA_OPT 9 #define ADC_INSTANCE ADC2 -#define BARO_I2C_INSTANCE (I2CDEV_1) -#define MAG_I2C_INSTANCE (I2CDEV_1) + +#define BARO_I2C_INSTANCE I2CDEV_1 +#define MAG_I2C_INSTANCE I2CDEV_1 + #define FLASH_SPI_INSTANCE SPI2 #define GYRO_1_SPI_INSTANCE SPI1 #define MAX7456_SPI_INSTANCE SPI2 diff --git a/configs/KAKUTEH7/config.h b/configs/KAKUTEH7/config.h index 1b85473b..5bdc21e0 100644 --- a/configs/KAKUTEH7/config.h +++ b/configs/KAKUTEH7/config.h @@ -33,6 +33,7 @@ #define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_ICM42688P #define USE_ACCGYRO_BMI270 +#define USE_BARO #define USE_BARO_BMP280 #define USE_BARO_DPS310 #define USE_MAX7456 @@ -84,45 +85,42 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PB0 , 2, 0) \ - TIMER_PIN_MAP( 1, PB1 , 2, 1) \ - TIMER_PIN_MAP( 2, PB3 , 1, 2) \ - TIMER_PIN_MAP( 3, PB10, 1, 3) \ - TIMER_PIN_MAP( 4, PA0 , 2, 4) \ - TIMER_PIN_MAP( 5, PA2 , 2, 5) \ - TIMER_PIN_MAP( 6, PC8 , 2, 6) \ - TIMER_PIN_MAP( 7, PC9 , 2, 7) \ - TIMER_PIN_MAP( 8, PD12, 1, 14) \ - TIMER_PIN_MAP( 9, PE9 , 1, 12) - + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 1) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 3) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 4) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 5) \ + TIMER_PIN_MAP( 6, MOTOR7_PIN , 2, 6) \ + TIMER_PIN_MAP( 7, MOTOR8_PIN , 2, 7) \ + TIMER_PIN_MAP( 8, LED_STRIP_PIN , 1, 14) \ + TIMER_PIN_MAP( 9, CAMERA_CONTROL_PIN, 1, -1) -#define SPI1_TX_DMA_OPT 13 -#define ADC1_DMA_OPT 8 -#define ADC3_DMA_OPT 9 -#define TIMUP1_DMA_OPT 0 -#define TIMUP2_DMA_OPT 0 -#define TIMUP3_DMA_OPT 2 -#define TIMUP4_DMA_OPT 0 -#define TIMUP5_DMA_OPT 0 -#define TIMUP8_DMA_OPT 1 +#define SPI1_TX_DMA_OPT 13 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define TIMUP1_DMA_OPT 0 +#define TIMUP2_DMA_OPT 0 +#define TIMUP3_DMA_OPT 2 +#define TIMUP4_DMA_OPT 0 +#define TIMUP5_DMA_OPT 3 +#define TIMUP8_DMA_OPT 1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_VOLTAGE_METER_SCALE 109 -#define DEFAULT_CURRENT_METER_SCALE 168 +#define DEFAULT_VOLTAGE_METER_SCALE 109 +#define DEFAULT_CURRENT_METER_SCALE 168 #define BEEPER_INVERTED #define SDCARD_DETECT_INVERTED #define USE_SDCARD_SPI -#define SDCARD_SPI_INSTANCE SPI1 -#define MAX7456_SPI_INSTANCE SPI2 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define PINIO1_CONFIG 129 -#define PINIO1_BOX 0 -#define GYRO_1_SPI_INSTANCE SPI4 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_1_ALIGN_YAW 2700 +#define SDCARD_SPI_INSTANCE SPI1 +#define MAX7456_SPI_INSTANCE SPI2 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 +#define GYRO_1_SPI_INSTANCE SPI4 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN_YAW 2700 diff --git a/configs/KAKUTEH7MINI/config.h b/configs/KAKUTEH7MINI/config.h index f373d174..d3e85295 100644 --- a/configs/KAKUTEH7MINI/config.h +++ b/configs/KAKUTEH7MINI/config.h @@ -33,7 +33,9 @@ #define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_ICM42688P #define USE_ACCGYRO_BMI270 +#define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_FLASH #define USE_FLASH_W25N01G #define USE_FLASH_W25Q128FV @@ -84,44 +86,41 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PB0 , 2, 0) \ - TIMER_PIN_MAP( 1, PB1 , 2, 1) \ - TIMER_PIN_MAP( 2, PB3 , 1, 2) \ - TIMER_PIN_MAP( 3, PB10, 1, 3) \ - TIMER_PIN_MAP( 4, PA0 , 2, 4) \ - TIMER_PIN_MAP( 5, PA2 , 2, 5) \ - TIMER_PIN_MAP( 6, PC8 , 2, 6) \ - TIMER_PIN_MAP( 7, PC9 , 2, 7) \ - TIMER_PIN_MAP( 8, PD12, 1, 14) \ - TIMER_PIN_MAP( 9, PE9 , 1, 12) - + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 1) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 3) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 4) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 5) \ + TIMER_PIN_MAP( 6, MOTOR7_PIN , 2, 6) \ + TIMER_PIN_MAP( 7, MOTOR8_PIN , 2, 7) \ + TIMER_PIN_MAP( 8, LED_STRIP_PIN , 1, 14) \ + TIMER_PIN_MAP( 9, CAMERA_CONTROL_PIN, 1, -1) -#define SPI1_TX_DMA_OPT 13 -#define ADC1_DMA_OPT 8 -#define ADC3_DMA_OPT 9 -#define TIMUP1_DMA_OPT 0 -#define TIMUP2_DMA_OPT 0 -#define TIMUP3_DMA_OPT 2 -#define TIMUP4_DMA_OPT 0 -#define TIMUP5_DMA_OPT 0 -#define TIMUP8_DMA_OPT 1 +#define SPI1_TX_DMA_OPT 13 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define TIMUP1_DMA_OPT 0 +#define TIMUP2_DMA_OPT 0 +#define TIMUP3_DMA_OPT 2 +#define TIMUP4_DMA_OPT 0 +#define TIMUP5_DMA_OPT 3 +#define TIMUP8_DMA_OPT 1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_VOLTAGE_METER_SCALE 110 -#define DEFAULT_CURRENT_METER_SCALE 168 +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SCALE 168 #define BEEPER_INVERTED //TODO #define SDCARD_MODE OFF -#define FLASH_SPI_INSTANCE SPI1 -#define MAX7456_SPI_INSTANCE SPI2 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define PINIO1_CONFIG 129 -#define PINIO1_BOX 40 -#define GYRO_1_SPI_INSTANCE SPI4 -#define GYRO_1_ALIGN CW270_DEG -#define GYRO_1_ALIGN_YAW 2700 +#define FLASH_SPI_INSTANCE SPI1 +#define MAX7456_SPI_INSTANCE SPI2 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define GYRO_1_SPI_INSTANCE SPI4 +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN_YAW 2700 diff --git a/configs/KAKUTEH7V2/config.h b/configs/KAKUTEH7V2/config.h index 393862f6..5c893838 100644 --- a/configs/KAKUTEH7V2/config.h +++ b/configs/KAKUTEH7V2/config.h @@ -29,7 +29,9 @@ #define USE_GYRO #define USE_ACC #define USE_ACCGYRO_BMI270 +#define USE_BARO #define USE_BARO_BMP280 +#define USE_BARO_DPS310 #define USE_FLASH #define USE_FLASH_W25N01G #define USE_MAX7456 @@ -80,44 +82,40 @@ #define USB_DETECT_PIN PA8 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, PB0 , 2, 0) \ - TIMER_PIN_MAP( 1, PB1 , 2, 1) \ - TIMER_PIN_MAP( 2, PB3 , 1, 2) \ - TIMER_PIN_MAP( 3, PB10, 1, 3) \ - TIMER_PIN_MAP( 4, PA0 , 2, 4) \ - TIMER_PIN_MAP( 5, PA2 , 2, 5) \ - TIMER_PIN_MAP( 6, PC8 , 2, 6) \ - TIMER_PIN_MAP( 7, PC9 , 2, 7) \ - TIMER_PIN_MAP( 8, PD12, 1, 14) \ - TIMER_PIN_MAP( 9, PE9 , 1, 12) - + TIMER_PIN_MAP( 0, MOTOR1_PIN , 2, 0) \ + TIMER_PIN_MAP( 1, MOTOR2_PIN , 2, 1) \ + TIMER_PIN_MAP( 2, MOTOR3_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR4_PIN , 1, 3) \ + TIMER_PIN_MAP( 4, MOTOR5_PIN , 2, 4) \ + TIMER_PIN_MAP( 5, MOTOR6_PIN , 2, 5) \ + TIMER_PIN_MAP( 6, MOTOR7_PIN , 2, 6) \ + TIMER_PIN_MAP( 7, MOTOR8_PIN , 2, 7) \ + TIMER_PIN_MAP( 8, LED_STRIP_PIN , 1, 14) \ + TIMER_PIN_MAP( 9, CAMERA_CONTROL_PIN, 1, -1) -#define SPI1_TX_DMA_OPT 13 -#define ADC1_DMA_OPT 8 -#define ADC3_DMA_OPT 9 -#define TIMUP1_DMA_OPT 0 -#define TIMUP2_DMA_OPT 0 -#define TIMUP3_DMA_OPT 2 -#define TIMUP4_DMA_OPT 0 -#define TIMUP5_DMA_OPT 0 -#define TIMUP8_DMA_OPT 1 +#define SPI1_TX_DMA_OPT 13 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define TIMUP1_DMA_OPT 0 +#define TIMUP2_DMA_OPT 0 +#define TIMUP3_DMA_OPT 2 +#define TIMUP4_DMA_OPT 0 +#define TIMUP5_DMA_OPT 3 +#define TIMUP8_DMA_OPT 1 -#define MAG_I2C_INSTANCE (I2CDEV_1) -#define USE_BARO -#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE I2CDEV_1 +#define BARO_I2C_INSTANCE I2CDEV_1 -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH -//TODO #define SDCARD_MODE OFF +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_VOLTAGE_METER_SCALE 109 -#define DEFAULT_CURRENT_METER_SCALE 168 +#define DEFAULT_VOLTAGE_METER_SCALE 109 +#define DEFAULT_CURRENT_METER_SCALE 168 #define BEEPER_INVERTED -#define FLASH_SPI_INSTANCE SPI1 -#define MAX7456_SPI_INSTANCE SPI2 -#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) -#define PINIO1_CONFIG 129 -#define PINIO2_CONFIG 129 -#define PINIO1_BOX 0 -#define PINIO2_BOX 40 -#define GYRO_1_SPI_INSTANCE SPI4 +#define FLASH_SPI_INSTANCE SPI1 +#define MAX7456_SPI_INSTANCE SPI2 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 0 +#define PINIO2_BOX 40 +#define GYRO_1_SPI_INSTANCE SPI4