Skip to content

Commit b56ca5e

Browse files
committed
ci(build): switch BareMinimum example to generic auto-resolved I3C bus
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
1 parent 7bd565e commit b56ca5e

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

CI/build/examples/BareMinimum/BareMinimum.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <SPI.h>
1515
#include <SoftwareSerial.h>
1616
#include <Wire.h>
17-
#if defined(I3C1_BASE)
17+
#if defined(I3C1_BASE) || defined(I3C2_BASE)
1818
#include <I3C.h>
1919
#endif
2020

@@ -135,18 +135,18 @@ void setup() {
135135
Wire.requestFrom(2, 1);
136136
Wire.end();
137137

138-
#if defined(I3C1_BASE)
138+
#if defined(I3C1_BASE) || defined(I3C2_BASE)
139139
// I3C
140-
I3C1Bus.setBusType(I3CBusType::Pure);
141-
I3C1Bus.setMixedBusOpenDrainFrequency(1000000U);
142-
I3C1Bus.begin(I3C_SDA, I3C_SCL, 1000000U, I3CBusType::Pure, 1000000U);
143-
I3C1Bus.setClock(1000000U);
140+
I3C.setBusType(I3CBusType::Pure);
141+
I3C.setMixedBusOpenDrainFrequency(1000000U);
142+
I3C.begin(I3C_SDA, I3C_SCL, 1000000U, I3CBusType::Pure, 1000000U);
143+
I3C.setClock(1000000U);
144144

145145
uint8_t i3cData = 0;
146-
I3C1Bus.isI3CDeviceReady(0x30, 1, 1);
147-
I3C1Bus.isI2CDeviceReady(0x48, 1, 1);
148-
I3C1Bus.readReg(0x30, 0x00, i3cData, 1);
149-
I3C1Bus.readReg(0x48, 0x00, i3cData, I3CTransferType::I2C, 1);
146+
I3C.isI3CDeviceReady(0x30, 1, 1);
147+
I3C.isI2CDeviceReady(0x48, 1, 1);
148+
I3C.readReg(0x30, 0x00, i3cData, 1);
149+
I3C.readReg(0x48, 0x00, i3cData, I3CTransferType::I2C, 1);
150150
#endif
151151

152152
// CMSIS DSP

0 commit comments

Comments
 (0)