From 1f0af8d0f34e1b2f502ce661dcd5eb622d00f11f Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Tue, 14 Aug 2018 19:59:26 +0200 Subject: [PATCH] fix pca9685 on bunch of boards that were using I2C device 2 --- src/main/target/AIRBOTF4/target.h | 2 ++ src/main/target/ALIENFLIGHTF3/target.h | 2 ++ src/main/target/ANYFC/target.h | 2 ++ src/main/target/ANYFCF7/target.h | 2 ++ src/main/target/ANYFCM7/target.h | 2 ++ src/main/target/ASGARD32F4/target.h | 2 ++ src/main/target/BETAFLIGHTF4/target.h | 2 ++ src/main/target/COLIBRI_RACE/target.h | 2 ++ src/main/target/F4BY/target.h | 2 ++ src/main/target/FALCORE/target.h | 2 ++ src/main/target/FIREWORKSV2/target.h | 2 ++ src/main/target/LUX_RACE/target.h | 2 ++ src/main/target/MATEKF405/target.h | 3 ++- src/main/target/MATEKF405SE/target.h | 2 ++ src/main/target/MOTOLAB/target.h | 2 ++ src/main/target/OMNIBUSF4/target.h | 2 ++ src/main/target/OMNIBUSF7/target.h | 2 ++ src/main/target/RCEXPLORERF3/target.h | 2 ++ src/main/target/REVO/target.h | 2 ++ src/main/target/SPARKY/target.h | 2 ++ src/main/target/SPARKY2/target.h | 2 ++ src/main/target/YUPIF4/target.h | 2 ++ 22 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/main/target/AIRBOTF4/target.h b/src/main/target/AIRBOTF4/target.h index aaaf251c21..8204dad9d8 100644 --- a/src/main/target/AIRBOTF4/target.h +++ b/src/main/target/AIRBOTF4/target.h @@ -159,3 +159,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/ALIENFLIGHTF3/target.h b/src/main/target/ALIENFLIGHTF3/target.h index 17e74af93f..ce2e3d7ae2 100644 --- a/src/main/target/ALIENFLIGHTF3/target.h +++ b/src/main/target/ALIENFLIGHTF3/target.h @@ -142,3 +142,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD (BIT(2)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/ANYFC/target.h b/src/main/target/ANYFC/target.h index 32bdc7c4ba..f6fc3aa695 100644 --- a/src/main/target/ANYFC/target.h +++ b/src/main/target/ANYFC/target.h @@ -143,3 +143,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/ANYFCF7/target.h b/src/main/target/ANYFCF7/target.h index 95fb709c01..dc981bda7c 100644 --- a/src/main/target/ANYFCF7/target.h +++ b/src/main/target/ANYFCF7/target.h @@ -206,3 +206,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTE 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/ANYFCM7/target.h b/src/main/target/ANYFCM7/target.h index 246626f67b..4bcae331ae 100644 --- a/src/main/target/ANYFCM7/target.h +++ b/src/main/target/ANYFCM7/target.h @@ -140,3 +140,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTE 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 diff --git a/src/main/target/ASGARD32F4/target.h b/src/main/target/ASGARD32F4/target.h index 0088b0ff8d..ab5081f129 100644 --- a/src/main/target/ASGARD32F4/target.h +++ b/src/main/target/ASGARD32F4/target.h @@ -172,3 +172,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/BETAFLIGHTF4/target.h b/src/main/target/BETAFLIGHTF4/target.h index f198229d3b..209bfacba3 100755 --- a/src/main/target/BETAFLIGHTF4/target.h +++ b/src/main/target/BETAFLIGHTF4/target.h @@ -180,3 +180,5 @@ #define TARGET_IO_PORTD BIT(2) #define MAX_PWM_OUTPUT_PORTS 4 + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/COLIBRI_RACE/target.h b/src/main/target/COLIBRI_RACE/target.h index 7390dc33d3..fd178eb5cc 100755 --- a/src/main/target/COLIBRI_RACE/target.h +++ b/src/main/target/COLIBRI_RACE/target.h @@ -134,3 +134,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD (BIT(2)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/F4BY/target.h b/src/main/target/F4BY/target.h index 117a1d1fa7..1513b781be 100644 --- a/src/main/target/F4BY/target.h +++ b/src/main/target/F4BY/target.h @@ -150,3 +150,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTE 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/FALCORE/target.h b/src/main/target/FALCORE/target.h index b06e3cb94c..5e24a7839d 100755 --- a/src/main/target/FALCORE/target.h +++ b/src/main/target/FALCORE/target.h @@ -144,3 +144,5 @@ #define TARGET_IO_PORTC 0xFFFF #define TARGET_IO_PORTD 0xFFFF #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/FIREWORKSV2/target.h b/src/main/target/FIREWORKSV2/target.h index 5fc2876c69..aded631dfa 100644 --- a/src/main/target/FIREWORKSV2/target.h +++ b/src/main/target/FIREWORKSV2/target.h @@ -184,3 +184,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/LUX_RACE/target.h b/src/main/target/LUX_RACE/target.h index 65ce6f8db1..ca13846a86 100644 --- a/src/main/target/LUX_RACE/target.h +++ b/src/main/target/LUX_RACE/target.h @@ -113,3 +113,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD (BIT(2)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/MATEKF405/target.h b/src/main/target/MATEKF405/target.h index 4576bad5cc..940b91c62f 100644 --- a/src/main/target/MATEKF405/target.h +++ b/src/main/target/MATEKF405/target.h @@ -154,7 +154,6 @@ #define DEFAULT_I2C_BUS BUS_I2C1 #endif - #define USE_BARO #define BARO_I2C_BUS DEFAULT_I2C_BUS #define USE_BARO_BMP280 @@ -214,3 +213,5 @@ #define TARGET_IO_PORTD (BIT(2)) #define MAX_PWM_OUTPUT_PORTS 6 + +#define PCA9685_I2C_BUS DEFAULT_I2C_BUS \ No newline at end of file diff --git a/src/main/target/MATEKF405SE/target.h b/src/main/target/MATEKF405SE/target.h index f78d50368e..af3b56c687 100644 --- a/src/main/target/MATEKF405SE/target.h +++ b/src/main/target/MATEKF405SE/target.h @@ -177,3 +177,5 @@ #define TARGET_IO_PORTD (BIT(2)) #define MAX_PWM_OUTPUT_PORTS 9 + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/MOTOLAB/target.h b/src/main/target/MOTOLAB/target.h index 8a684ecba2..3ab28a0660 100644 --- a/src/main/target/MOTOLAB/target.h +++ b/src/main/target/MOTOLAB/target.h @@ -131,3 +131,5 @@ // #define TARGET_IO_PORTF (BIT(0)|BIT(1)) // !!TODO - check the following line is correct #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/OMNIBUSF4/target.h b/src/main/target/OMNIBUSF4/target.h index bde540f94c..dd420f158e 100644 --- a/src/main/target/OMNIBUSF4/target.h +++ b/src/main/target/OMNIBUSF4/target.h @@ -262,3 +262,5 @@ #ifdef OMNIBUSF4PRO #define CURRENT_METER_SCALE 265 #endif + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/OMNIBUSF7/target.h b/src/main/target/OMNIBUSF7/target.h index 7ca20bde03..ecff774e87 100644 --- a/src/main/target/OMNIBUSF7/target.h +++ b/src/main/target/OMNIBUSF7/target.h @@ -223,3 +223,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff #define TARGET_IO_PORTE 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/RCEXPLORERF3/target.h b/src/main/target/RCEXPLORERF3/target.h index 5e02db74fb..76a9233c8e 100644 --- a/src/main/target/RCEXPLORERF3/target.h +++ b/src/main/target/RCEXPLORERF3/target.h @@ -121,3 +121,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 diff --git a/src/main/target/REVO/target.h b/src/main/target/REVO/target.h index 9857ccc55e..d0400ac33c 100644 --- a/src/main/target/REVO/target.h +++ b/src/main/target/REVO/target.h @@ -158,3 +158,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/SPARKY/target.h b/src/main/target/SPARKY/target.h index b2a3facbb3..ede88c4095 100644 --- a/src/main/target/SPARKY/target.h +++ b/src/main/target/SPARKY/target.h @@ -117,3 +117,5 @@ #define TARGET_IO_PORTA (BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) #define TARGET_IO_PORTB (BIT(0)|BIT(1)|BIT(6)|BIT(10)|BIT(11)|BIT(14)|BIT(15)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(12)|BIT(13)) #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/SPARKY2/target.h b/src/main/target/SPARKY2/target.h index 0e257fd6da..081e9563d3 100644 --- a/src/main/target/SPARKY2/target.h +++ b/src/main/target/SPARKY2/target.h @@ -140,3 +140,5 @@ #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file diff --git a/src/main/target/YUPIF4/target.h b/src/main/target/YUPIF4/target.h index 65c2bc43ad..a8b5db4f60 100644 --- a/src/main/target/YUPIF4/target.h +++ b/src/main/target/YUPIF4/target.h @@ -177,3 +177,5 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD (BIT(2)) + +#define PCA9685_I2C_BUS BUS_I2C2 \ No newline at end of file