Skip to content

Commit ed1e17d

Browse files
committed
chore(i3c): disable for HALv2 support
I3C required some rework to support HALv2 driver, so disable it for now. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 10736dc commit ed1e17d

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎CI/build/examples/BareMinimum/BareMinimum.ino‎

Lines changed: 2 additions & 2 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(HAL_I3C_MODULE_ENABLED)
1818
#include <I3C.h>
1919
#endif
2020

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

138-
#if defined(I3C1_BASE)
138+
#if defined(I3C1_BASE) && defined(HAL_I3C_MODULE_ENABLED)
139139
// I3C
140140
I3C1Bus.setBusType(I3CBusType::Pure);
141141
I3C1Bus.setMixedBusOpenDrainFrequency(1000000U);

‎libraries/I3C/src/I3C.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <cstring>
33

44
#if defined(I3C1_BASE) || defined(I3C2_BASE)
5+
#if !defined(USE_HALV2_DRIVER)
56

67
// ============================================================================
78
// Global bus instances
@@ -1872,4 +1873,5 @@ extern "C" void I3C2_ER_IRQHandler(void)
18721873
}
18731874
#endif
18741875

1875-
#endif
1876+
#endif /* !USE_HALV2_DRIVER */
1877+
#endif /* I3C1_BASE || I3C2_BASE */

‎libraries/I3C/src/I3C.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
#if defined(I3C1_BASE) || defined(I3C2_BASE)
66

7+
#if defined(USE_HALV2_DRIVER)
8+
#warning "I3C library is not yet compatible with HALv2 driver."
9+
#else
710
#include "stm32yyxx_util_i3c.h"
811

912
// ============================================================================
@@ -557,4 +560,5 @@ class I3CBus {
557560
extern I3CBus I3C2Bus;
558561
#endif
559562

560-
#endif
563+
#endif /* !USE_HALV2_DRIVER */
564+
#endif /* I3C1_BASE || I3C2_BASE */

‎libraries/I3C/src/I3C_I2C.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#if defined(I3C1_BASE) || defined(I3C2_BASE)
55

6+
#if !defined(USE_HALV2_DRIVER)
67
// ============================================================================
78
// I2C helpers on mixed I3C bus
89
// ============================================================================
@@ -398,4 +399,5 @@ int I3CBus::readRegBuffer(uint8_t addr,
398399
: readRegBuffer(addr, reg, pData, len, timeout);
399400
}
400401

401-
#endif
402+
#endif /* !USE_HALV2_DRIVER */
403+
#endif /* I3C1_BASE || I3C2_BASE */

0 commit comments

Comments
 (0)