File tree Expand file tree Collapse file tree 4 files changed +573
-5
lines changed Expand file tree Collapse file tree 4 files changed +573
-5
lines changed Original file line number Diff line number Diff line change @@ -202,11 +202,11 @@ const (
202202 // #===========#==========#==============#==============#=======#=======#
203203 // | Interface | Hardware | Bus(Freq) | SDA/SCL Pins | AltFn | Alias |
204204 // #===========#==========#==============#==============#=======#=======#
205- // | I2C1 | I2C1 | | D14/D15 | | ~ |
206- // | I2C2 | I2C2 | | D0/D1 | | ~ |
207- // | I2C3 | I2C1 | | D9/D10 | | ~ |
205+ // | I2C1 | I2C1 | APB1(42 MHz) | D14/D15 | 4 | ~ |
206+ // | I2C2 | I2C2 | APB1(42 MHz) | D0/D1 | 4 | ~ |
207+ // | I2C3 | I2C1 | APB1(42 MHz) | D9/D10 | 4 | ~ |
208208 // | --------- | -------- | ------------ | ------------ | ----- | ----- |
209- // | I2C0 | I2C1 | | D14/D15 | | I2C1 |
209+ // | I2C0 | I2C1 | APB1(42 MHz) | D14/D15 | 4 | I2C1 |
210210 // #===========#==========#==============#==============#=======#=======#
211211 NUM_I2C_INTERFACES = 3
212212
@@ -226,4 +226,20 @@ const (
226226 I2C_SCL_PIN = I2C0_SCL_PIN //
227227)
228228
229+ var (
230+ I2C1 = I2C {
231+ Bus : stm32 .I2C1 ,
232+ AltFuncSelector : stm32 .AF4_I2C1_2_3 ,
233+ }
234+ I2C2 = I2C {
235+ Bus : stm32 .I2C2 ,
236+ AltFuncSelector : stm32 .AF4_I2C1_2_3 ,
237+ }
238+ I2C3 = I2C {
239+ Bus : stm32 .I2C1 ,
240+ AltFuncSelector : stm32 .AF4_I2C1_2_3 ,
241+ }
242+ I2C0 = I2C1
243+ )
244+
229245func initI2C () {}
Original file line number Diff line number Diff line change 1- // +build avr nrf sam stm32,!stm32f4 fe310 k210
1+ // +build avr nrf sam stm32,!stm32f407 fe310 k210
22
33package machine
44
You can’t perform that action at this time.
0 commit comments