Skip to content

Commit

Permalink
BMI270 - fix detect
Browse files Browse the repository at this point in the history
fixes requirement for mpu6000 defines
  • Loading branch information
nerdCopter committed Aug 28, 2023
1 parent 945016f commit 206f7cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/drivers/accgyro/accgyro_spi_bmi270.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ static void bmi270EnableSPI(const busDevice_t *bus)

uint8_t bmi270Detect(const busDevice_t *bus)
{
#ifndef USE_DUAL_GYRO
IOInit(bus->busdev_u.spi.csnPin, OWNER_MPU_CS, 0);
IOConfigGPIO(bus->busdev_u.spi.csnPin, SPI_IO_CS_CFG);
IOHi(bus->busdev_u.spi.csnPin);
#endif

spiSetDivisor(bus->busdev_u.spi.instance, spiCalculateDivider(BMI270_MAX_SPI_CLK_HZ));
bmi270EnableSPI(bus);

Expand Down

0 comments on commit 206f7cd

Please sign in to comment.