Add IMU_USE_EXTERNAL_CLOCK to debug.h (#464)

* Add IMU_USE_EXTERNAL_CLOCK to debug.h

* Move it to globals.h actually
This commit is contained in:
Meia
2025-07-19 14:00:38 +02:00
committed by GitHub
parent 0425f66561
commit 51c7d15a8b
2 changed files with 6 additions and 0 deletions

View File

@@ -53,6 +53,10 @@
#define EXPERIMENTAL_BNO_DISABLE_ACCEL_CALIBRATION true
#endif
#ifndef IMU_USE_EXTERNAL_CLOCK
#define IMU_USE_EXTERNAL_CLOCK true // Use external clock for IMU (ICM-45686 only)
#endif
#ifndef VENDOR_NAME
#define VENDOR_NAME "Unknown"
#endif

View File

@@ -75,8 +75,10 @@ struct ICM45686 : public ICM45Base {
bool initialize() {
ICM45Base::softResetIMU();
#if IMU_USE_EXTERNAL_CLOCK
m_RegisterInterface.writeReg(Regs::Pin9Config::reg, Regs::Pin9Config::value);
m_RegisterInterface.writeReg(Regs::RtcConfig::reg, Regs::RtcConfig::value);
#endif
return ICM45Base::initializeBase();
}
};