[X-LiteS] Gyro added
This commit is contained in:
@@ -143,13 +143,17 @@ elseif(PCB STREQUAL XLITES)
|
||||
set(STATUS_LEDS YES)
|
||||
endif()
|
||||
|
||||
#if(PCB STREQUAL XLITES)
|
||||
# add_definitions(-DGYRO)
|
||||
# set(TARGET_SRC
|
||||
# ${TARGET_SRC}
|
||||
# ../common/arm/stm32/lsm6ds3_driver.cpp
|
||||
# )
|
||||
#endif()
|
||||
if(PCB STREQUAL XLITES)
|
||||
add_definitions(-DGYRO)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
../common/arm/stm32/lsm6ds3_driver.cpp
|
||||
)
|
||||
set(SRC
|
||||
${SRC}
|
||||
gyro.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X3)
|
||||
option(PXX1 "PXX1 protocol support" OFF)
|
||||
|
||||
@@ -290,6 +290,11 @@ void boardInit()
|
||||
initHeadphoneTrainerSwitch();
|
||||
|
||||
vbattRTC = getRTCBattVoltage();
|
||||
|
||||
#if defined(GYRO)
|
||||
gyroInit();
|
||||
#endif
|
||||
|
||||
#endif // !defined(SIMU)
|
||||
}
|
||||
|
||||
|
||||
@@ -805,4 +805,10 @@ extern Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
|
||||
extern DMAFifo<32> serial2RxFifo;
|
||||
#endif
|
||||
|
||||
// Gyro driver
|
||||
#define GYRO_VALUES_COUNT 6
|
||||
#define GYRO_BUFFER_LENGTH (GYRO_VALUES_COUNT * sizeof(int16_t))
|
||||
int gyroInit();
|
||||
int gyroRead(uint8_t buffer[GYRO_BUFFER_LENGTH]);
|
||||
|
||||
#endif // _BOARD_H_
|
||||
|
||||
Reference in New Issue
Block a user