Skip to content

Commit 5b7e3f9

Browse files
committed
Create IMU object with SPI or Wire interface according to core LSM6DS_DEFAULT_SPI define
1 parent 849be94 commit 5b7e3f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/LSM6DSOX.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,8 @@ int LSM6DSOXClass::writeRegister(uint8_t address, uint8_t value)
265265
return 1;
266266
}
267267

268+
#ifdef LSM6DS_DEFAULT_SPI
269+
LSM6DSOXClass IMU(LSM6DS_DEFAULT_SPI, PIN_SPI_SS1, LSM6DS_INT);
270+
#else
268271
LSM6DSOXClass IMU(Wire, LSM6DSOX_ADDRESS);
272+
#endif

0 commit comments

Comments
 (0)