Skip to content

Commit

Permalink
Merge pull request betaflight#11609 from SteveCEvans/bmi270_driver
Browse files Browse the repository at this point in the history
  • Loading branch information
blckmn committed May 18, 2022
2 parents b2deec1 + 8821162 commit 6527eb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/drivers/accgyro/accgyro_spi_bmi270.c
Expand Up @@ -338,7 +338,7 @@ static bool bmi270AccRead(accDev_t *acc)
acc->gyro->dev.txBuf[0] = BMI270_REG_ACC_DATA_X_LSB | 0x80;

busSegment_t segments[] = {
{.u.buffers = {NULL, NULL}, 7, true, NULL},
{.u.buffers = {NULL, NULL}, 8, true, NULL},
{.u.link = {NULL, NULL}, 0, true, NULL},
};
segments[0].u.buffers.txData = acc->gyro->dev.txBuf;
Expand Down Expand Up @@ -381,7 +381,7 @@ static bool bmi270GyroReadRegister(gyroDev_t *gyro)
case GYRO_EXTI_INIT:
{
// Initialise the tx buffer to all 0x00
memset(gyro->dev.txBuf, 0x00, 13);
memset(gyro->dev.txBuf, 0x00, 14);
#ifdef USE_GYRO_EXTI
// Check that minimum number of interrupts have been detected

Expand All @@ -392,7 +392,7 @@ static bool bmi270GyroReadRegister(gyroDev_t *gyro)
if (spiUseDMA(&gyro->dev)) {
gyro->dev.callbackArg = (uint32_t)gyro;
gyro->dev.txBuf[0] = BMI270_REG_ACC_DATA_X_LSB | 0x80;
gyro->segments[0].len = 13;
gyro->segments[0].len = 14;
gyro->segments[0].callback = bmi270Intcallback;
gyro->segments[0].u.buffers.txData = gyro->dev.txBuf;
gyro->segments[0].u.buffers.rxData = gyro->dev.rxBuf;
Expand All @@ -416,7 +416,7 @@ static bool bmi270GyroReadRegister(gyroDev_t *gyro)
gyro->dev.txBuf[0] = BMI270_REG_GYR_DATA_X_LSB | 0x80;

busSegment_t segments[] = {
{.u.buffers = {NULL, NULL}, 7, true, NULL},
{.u.buffers = {NULL, NULL}, 8, true, NULL},
{.u.link = {NULL, NULL}, 0, true, NULL},
};
segments[0].u.buffers.txData = gyro->dev.txBuf;
Expand Down

0 comments on commit 6527eb0

Please sign in to comment.