@@ -64,14 +64,32 @@ i2c_pins! {
64
64
sda => [ gpiob:: PB14 <Alternate <AF5 >>, gpiof:: PF0 <Alternate <AF1 >>] ,
65
65
}
66
66
}
67
- #[ cfg( any( feature = "stm32f030x8" , feature = "stm32f030xc" ) ) ]
67
+ #[ cfg( feature = "stm32f070" ) ]
68
+ i2c_pins ! {
69
+ I2C1 => {
70
+ scl => [ gpiob:: PB6 <Alternate <AF1 >>, gpiob:: PB8 <Alternate <AF1 >>] ,
71
+ sda => [ gpiob:: PB7 <Alternate <AF1 >>, gpiob:: PB9 <Alternate <AF1 >>] ,
72
+ }
73
+ }
74
+ #[ cfg( feature = "stm32f070x6" ) ]
75
+ i2c_pins ! {
76
+ I2C1 => {
77
+ scl => [ gpioa:: PA9 <Alternate <AF4 >>, gpiof:: PF0 <Alternate <AF1 >>] ,
78
+ sda => [ gpioa:: PA10 <Alternate <AF4 >>, gpiof:: PF1 <Alternate <AF1 >>] ,
79
+ }
80
+ }
81
+ #[ cfg( any(
82
+ feature = "stm32f030x8" ,
83
+ feature = "stm32f030xc" ,
84
+ feature = "stm32f070xb"
85
+ ) ) ]
68
86
i2c_pins ! {
69
87
I2C2 => {
70
88
scl => [ gpiob:: PB10 <Alternate <AF1 >>] ,
71
89
sda => [ gpiob:: PB11 <Alternate <AF1 >>] ,
72
90
}
73
91
}
74
- #[ cfg( feature = "stm32f030xc" ) ]
92
+ #[ cfg( any ( feature = "stm32f030xc" , feature = "stm32f070xb" ) ) ]
75
93
i2c_pins ! {
76
94
I2C2 => {
77
95
scl => [ gpiob:: PB13 <Alternate <AF5 >>] ,
@@ -110,11 +128,15 @@ macro_rules! i2c {
110
128
) +
111
129
}
112
130
}
113
- #[ cfg( any( feature = "stm32f042" , feature = "stm32f030" ) ) ]
131
+ #[ cfg( any( feature = "stm32f042" , feature = "stm32f030" , feature = "stm32f070" ) ) ]
114
132
i2c ! {
115
133
I2C1 : ( i2c1, i2c1en, i2c1rst, apb1enr, apb1rstr) ,
116
134
}
117
- #[ cfg( any( feature = "stm32f030xc" , feature = "stm32f030xc" ) ) ]
135
+ #[ cfg( any(
136
+ feature = "stm32f030xc" ,
137
+ feature = "stm32f030xc" ,
138
+ feature = "stm32f070xb"
139
+ ) ) ]
118
140
i2c ! {
119
141
I2C2 : ( i2c2, i2c2en, i2c2rst, apb1enr, apb1rstr) ,
120
142
}
0 commit comments