Added runtime setting of gyro SPI pin
[betaflight.git] / src / main / drivers / accgyro_spi_icm20689.h
blob5325439328407592f35c3ea46a6379d6c2771258
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
17 #pragma once
19 #include "sensor.h"
21 #define ICM20689_WHO_AM_I_CONST (0x98)
22 #define ICM20689_BIT_RESET (0x80)
24 bool icm20689AccDetect(accDev_t *acc);
25 bool icm20689GyroDetect(gyroDev_t *gyro);
27 void icm20689AccInit(accDev_t *acc);
28 void icm20689GyroInit(gyroDev_t *gyro);
30 bool icm20689SpiDetect(const busDevice_t *bus);
32 bool icm20689SpiAccDetect(accDev_t *acc);
33 bool icm20689SpiGyroDetect(gyroDev_t *gyro);
35 bool icm20689SpiWriteRegister(const busDevice_t *bus, uint8_t reg, uint8_t data);
36 bool icm20689SpiReadRegister(const busDevice_t *bus, uint8_t reg, uint8_t length, uint8_t *data);