1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Move LSM303DLHC I2C pins to the correct config

This commit is contained in:
toastedcornflakes 2017-10-18 21:00:32 +01:00
parent d597a9aea7
commit dd492d1ba0
3 changed files with 15 additions and 9 deletions

View file

@ -71,15 +71,6 @@ typedef struct {
conditions (interrupts routines ...). */
#define LSM303DLHC_FLAG_TIMEOUT ((uint32_t)0x1000)
#define LSM303DLHC_LONG_TIMEOUT ((uint32_t)(10 * LSM303DLHC_FLAG_TIMEOUT))
/**
* @brief LSM303DLHC I2C Interface pins
*/
#define LSM303DLHC_I2C I2C1
#define LSM303DLHC_I2C_SCK_PIN PB6 /* PB.06 */
#define LSM303DLHC_I2C_SDA_PIN PB7 /* PB.7 */
#define LSM303DLHC_DRDY_PIN PE2 /* PE.02 */
#define LSM303DLHC_I2C_INT1_PIN PE4 /* PE.04 */
#define LSM303DLHC_I2C_INT2_PIN PE5 /* PE.05 */
/******************************************************************************/
/*************************** START REGISTER MAPPING **************************/

View file

@ -78,6 +78,13 @@
#define ACC
#define USE_ACC_MPU6050
#define USE_ACC_LSM303DLHC
#define LSM303DLHC_I2C I2C1
#define LSM303DLHC_I2C_SCK_PIN PB6
#define LSM303DLHC_I2C_SDA_PIN PB7
#define LSM303DLHC_DRDY_PIN PE2
#define LSM303DLHC_I2C_INT1_PIN PE4
#define LSM303DLHC_I2C_INT2_PIN PE5
#define ACC_MPU6050_ALIGN CW0_DEG
#define BARO

View file

@ -178,6 +178,14 @@
#define USE_I2C_DEVICE_1
#define I2C_DEVICE (I2CDEV_1)
#define LSM303DLHC_I2C I2C1
#define LSM303DLHC_I2C_SCK_PIN PB6
#define LSM303DLHC_I2C_SDA_PIN PB7
#define LSM303DLHC_DRDY_PIN PE2
#define LSM303DLHC_I2C_INT1_PIN PE4
#define LSM303DLHC_I2C_INT2_PIN PE5
#define USE_ADC
#define ADC_INSTANCE ADC1
#define VBAT_ADC_PIN PC0