Skip to content

Commit

Permalink
Get rid of rev4 PB13 usage
Browse files Browse the repository at this point in the history
  • Loading branch information
trollcop committed Aug 18, 2014
1 parent 3c4e624 commit fa986ab
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/drv_mpu6050.c
Expand Up @@ -236,14 +236,13 @@ static void mpu6050GyroInit(sensor_align_e align)
{
gpio_config_t gpio;

// MPU_INT output on rev4/5 hardware (PB13, PC13)
gpio.pin = Pin_13;
gpio.speed = Speed_2MHz;
gpio.mode = Mode_IN_FLOATING;
if (hw_revision == NAZE32)
gpioInit(GPIOB, &gpio);
else if (hw_revision >= NAZE32_REV5)
// MPU_INT output on rev5 hardware (PC13). rev4 was on PB13, conflicts with SPI devices
if (hw_revision >= NAZE32_REV5) {
gpio.pin = Pin_13;
gpio.speed = Speed_2MHz;
gpio.mode = Mode_IN_FLOATING;
gpioInit(GPIOC, &gpio);
}

i2cWrite(MPU6050_ADDRESS, MPU_RA_PWR_MGMT_1, 0x80); //PWR_MGMT_1 -- DEVICE_RESET 1
delay(5);
Expand Down

0 comments on commit fa986ab

Please sign in to comment.