Skip to content

Commit 94e20e8

Browse files
committed
feat(I3C): Add I3C library Support
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
1 parent 7b16f64 commit 94e20e8

9 files changed

Lines changed: 2929 additions & 0 deletions

File tree

STM32_open_pin_data

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit d2ca9b5ed0b35ad3aa92e91984ec7addae58bf7e

cores/arduino/pins_arduino.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ static const uint32_t SCK = PIN_SPI_SCK;
8383
static const uint32_t SDA = PIN_WIRE_SDA;
8484
static const uint32_t SCL = PIN_WIRE_SCL;
8585

86+
/* I3C Definitions */
87+
#ifndef PIN_I3C_SDA
88+
#define PIN_I3C_SDA 14
89+
#endif
90+
#ifndef PIN_I3C_SCL
91+
#define PIN_I3C_SCL 15
92+
#endif
93+
94+
static const uint32_t I3C_SDA = PIN_I3C_SDA;
95+
static const uint32_t I3C_SCL = PIN_I3C_SCL;
96+
8697
#ifdef __cplusplus
8798
extern "C" {
8899
#endif

cores/arduino/stm32/stm32yyxx_hal_conf.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
#undef HAL_I2S_MODULE_ENABLED
4747
#endif
4848

49+
#if !defined(HAL_I3C_MODULE_DISABLED)
50+
#define HAL_I3C_MODULE_ENABLED
51+
#else
52+
#undef HAL_I3C_MODULE_ENABLED
53+
#endif
54+
4955
#if !defined(HAL_RTC_MODULE_DISABLED)
5056
#define HAL_RTC_MODULE_ENABLED
5157
#else

libraries/I3C/keywords.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
I3CBus KEYWORD1
2+
I3CDiscoveredDevice KEYWORD1
3+
I3CKnownDevice KEYWORD1
4+
I3CBusBeginConfig KEYWORD1
5+
I3CTargetConfig KEYWORD1
6+
I3CControllerIbiInfo KEYWORD1
7+
I3CRole KEYWORD1
8+
9+
begin KEYWORD2
10+
beginTarget KEYWORD2
11+
beginBus KEYWORD2
12+
discover KEYWORD2
13+
setBusFrequency KEYWORD2
14+
setClock KEYWORD2
15+
16+
write KEYWORD2
17+
read KEYWORD2
18+
writeReg KEYWORD2
19+
readReg KEYWORD2
20+
writeRegBuffer KEYWORD2
21+
readRegBuffer KEYWORD2
22+
23+
isI2CDeviceReady KEYWORD2
24+
isI3CDeviceReady KEYWORD2
25+
26+
resetDynamicAddresses KEYWORD2
27+
disableEvents KEYWORD2
28+
disableAllEvents KEYWORD2
29+
assignDynamicAddress KEYWORD2
30+
assignAllStaticAsDynamic KEYWORD2
31+
32+
getbcr KEYWORD2
33+
getdcr KEYWORD2
34+
getpid KEYWORD2
35+
36+
entdaa KEYWORD2
37+
38+
hasAddress KEYWORD2
39+
address KEYWORD2
40+
send KEYWORD2
41+
receive KEYWORD2
42+
43+
sendIbi KEYWORD2
44+
enableTargetEvents KEYWORD2
45+
disableTargetEvents KEYWORD2
46+
availableTargetEvent KEYWORD2
47+
fetchTargetEvent KEYWORD2
48+
hasTargetEvent KEYWORD2
49+
readTargetEvent KEYWORD2
50+
51+
configureControllerDevice KEYWORD2
52+
enableIbi KEYWORD2
53+
enableControllerEvents KEYWORD2
54+
disableControllerEvents KEYWORD2
55+
hasIbi KEYWORD2
56+
peekIbi KEYWORD2
57+
readIbi KEYWORD2
58+
onIbi KEYWORD2

libraries/I3C/library.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=I3C
2+
version=0.1.0
3+
author=Bahssain Aymane
4+
maintainer=stm32duino
5+
sentence=Arduino-friendly I3C for STM32 mcu with I3C support.
6+
paragraph=Provides a lightweight I3C bus class (I3CBus).
7+
category=Communication
8+
url=https://github.com/STMicroelectronics/STM32I3C
9+
architectures=stm32

0 commit comments

Comments
 (0)