Skip to content

Commit edd7e25

Browse files
authored
Merge pull request #14 from giulcioffi/integration_fixes
Add automatic selection of Wire/SPI interface
2 parents 849be94 + 5b7e3f9 commit edd7e25

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)