File tree Expand file tree Collapse file tree
examples/LIS2DUXS12_Datalog_Terminal_I3C Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ An instance can be created and enabled when the SPI bus is used following the pr
2626 Accelero.begin();
2727 Accelero.Enable_X();
2828
29- An instance can be created and enabled when the I3C bus is used with SETDASA (static-to-dynamic address assignment):
29+ An instance can be created and enabled when the I3C bus is used with SETDASA (static-to-dynamic address assignment):
30+
3031 LIS2DUXS12Sensor Accelero(&I3C, LIS2DUXS12_I3C_ADD_H);
3132 I3C.resetDynamicAddresses();
33+ I3C.isI3CDeviceReady(0x19);
3234 I3C.assignDynamicAddress(Accelero.getStaticAddress(), LIS2DUXS12_DYNAMIC_ADDRESS);
3335 Accelero.begin(LIS2DUXS12_DYNAMIC_ADDRESS);
3436 I3C.setClock(12500000);
@@ -38,6 +40,7 @@ An instance can be created and enabled when the I3C bus is used with ENTDAA (dyn
3840
3941 LIS2DUXS12Sensor Accelero(&I3C);
4042 I3C.begin(I3C_SDA, I3C_SCL, 1000000U);
43+ I3C.isI3CDeviceReady(0x19);
4144 I3C.discover(devices, 8, &found);
4245 // find dynAddr by matching LIS2DUXS12_I3C_PID_H in discovered devices
4346 Accelero.begin(dynAddr);
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ void setup()
3636 Serial.println (" resetDynamicAddresses() failed" );
3737 while (1 ) {}
3838 }
39+
40+ if (!I3C .isI3CDeviceReady (0x19 )) {
41+ Serial.println (" isI3CDeviceReady() failed" );
42+ while (1 ) {}
43+ }
44+
3945 if (!I3C .assignDynamicAddress (sensor.getStaticAddress (), LIS2DUXS12_DYNAMIC_ADDRESS )) {
4046 Serial.println (" assignDynamicAddress() failed" );
4147 while (1 ) {}
Original file line number Diff line number Diff line change 11name =STM32duino LIS2DUXS12
2- version =1.1.0
2+ version =1.1.1
33author =SRA
44maintainer =stm32duino
55sentence =Ultra Low Power 3D accelerometer.
You can’t perform that action at this time.
0 commit comments