diff --git a/README.md b/README.md index cc9c6bb..92c7d69 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,11 @@ An instance can be created and enabled when the SPI bus is used following the pr Accelero.begin(); Accelero.Enable_X(); -An instance can be created and enabled when the I3C bus is used with SETDASA (static-to-dynamic address assignment): +An instance can be created and enabled when the I3C bus is used with SETDASA (static-to-dynamic address assignment): + LIS2DUXS12Sensor Accelero(&I3C, LIS2DUXS12_I3C_ADD_H); I3C.resetDynamicAddresses(); + I3C.isI3CDeviceReady(0x19); I3C.assignDynamicAddress(Accelero.getStaticAddress(), LIS2DUXS12_DYNAMIC_ADDRESS); Accelero.begin(LIS2DUXS12_DYNAMIC_ADDRESS); I3C.setClock(12500000); @@ -38,6 +40,7 @@ An instance can be created and enabled when the I3C bus is used with ENTDAA (dyn LIS2DUXS12Sensor Accelero(&I3C); I3C.begin(I3C_SDA, I3C_SCL, 1000000U); + I3C.isI3CDeviceReady(0x19); I3C.discover(devices, 8, &found); // find dynAddr by matching LIS2DUXS12_I3C_PID_H in discovered devices Accelero.begin(dynAddr); diff --git a/examples/LIS2DUXS12_Datalog_Terminal_I3C/LIS2DUXS12_Datalog_Terminal_I3C.ino b/examples/LIS2DUXS12_Datalog_Terminal_I3C/LIS2DUXS12_Datalog_Terminal_I3C.ino index 91995af..2d6c7c6 100644 --- a/examples/LIS2DUXS12_Datalog_Terminal_I3C/LIS2DUXS12_Datalog_Terminal_I3C.ino +++ b/examples/LIS2DUXS12_Datalog_Terminal_I3C/LIS2DUXS12_Datalog_Terminal_I3C.ino @@ -36,6 +36,12 @@ void setup() Serial.println("resetDynamicAddresses() failed"); while (1) {} } + + if (!I3C.isI3CDeviceReady(0x19)) { + Serial.println("isI3CDeviceReady() failed"); + while (1) {} + } + if (!I3C.assignDynamicAddress(sensor.getStaticAddress(), LIS2DUXS12_DYNAMIC_ADDRESS)) { Serial.println("assignDynamicAddress() failed"); while (1) {} diff --git a/library.properties b/library.properties index 5d4c25f..943585f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=STM32duino LIS2DUXS12 -version=1.1.0 +version=1.1.1 author=SRA maintainer=stm32duino sentence=Ultra Low Power 3D accelerometer.