Skip to content

Commit 0a3558e

Browse files
committed
feat(I3C): add dual HAL V1/V2 support
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
1 parent 557d429 commit 0a3558e

6 files changed

Lines changed: 1338 additions & 186 deletions

File tree

‎cores/arduino/stm32/stm32yyxx_hal_conf.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
#define USE_HAL_I2S_MODULE 1U
5555
#endif
5656

57+
#if defined(HAL_I3C_MODULE_DISABLED)
58+
#if defined(USE_HAL_I3C_MODULE)
59+
#undef USE_HAL_I3C_MODULE
60+
#endif
61+
#define USE_HAL_I3C_MODULE 0U
62+
#else
63+
#define USE_HAL_I3C_MODULE 1U
64+
#define USE_HAL_I3C_GET_LAST_ERRORS 0U
65+
#endif
66+
5767
#if defined(HAL_RTC_MODULE_DISABLED)
5868
#if defined(USE_HAL_RTC_MODULE)
5969
#undef USE_HAL_RTC_MODULE

‎libraries/I3C/examples/Controller_Target/TargetReceive/TargetReceive.ino‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ void setup() {
3030
Serial.print("DA = 0x");
3131
Serial.println(I3C.address(), HEX);
3232

33-
HAL_I3C_FlushAllFifo(I3C.halHandle());
33+
bool ok = I3C.flushAllFifos();
34+
Serial.print("flushAllFifos = ");
35+
Serial.println(ok ? "true" : "false");
3436

3537
int rc = I3C.receive(rxBuf, sizeof(rxBuf), 10000);
3638
Serial.print("receive rc = ");

0 commit comments

Comments
 (0)