Skip to content

Commit 552a8c7

Browse files
authored
Merge pull request #151 from bobmcwhirter/i2c3-stml4s5
Add HAL for i2c3 available on the stm32l4x5 family.
2 parents 19b1d60 + c687836 commit 552a8c7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/i2c.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ hal! {
326326
use crate::gpio::gpioa::{PA10, PA9};
327327
use crate::gpio::gpiob::{PB10, PB11, PB6, PB7};
328328

329+
#[cfg(feature = "stm32l4x5")]
330+
use crate::gpio::gpioc::{PC0, PC1};
331+
329332
pins!(I2C1, AF4,
330333
SCL: [PA9, PB6],
331334
SDA: [PA10, PB7]);
@@ -340,3 +343,13 @@ pins!(I2C1, AF4, SCL: [PB8], SDA: [PB9]);
340343

341344
#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x6"))]
342345
pins!(I2C2, AF4, SCL: [PB13], SDA: [PB14]);
346+
347+
#[cfg(feature = "stm32l4x5")]
348+
pins!(I2C3, AF4, SCL: [PC0], SDA: [PC1]);
349+
350+
#[cfg(feature = "stm32l4x5")]
351+
use crate::stm32::I2C3;
352+
#[cfg(feature = "stm32l4x5")]
353+
hal! {
354+
I2C3: (i2c3, i2c3en, i2c3rst),
355+
}

0 commit comments

Comments
 (0)