Skip to content

Commit 33a714e

Browse files
authored
Merge pull request #311 from Sh3Rm4n/into_af
Use newer into_af methods
2 parents f3d375e + 9a6e307 commit 33a714e

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/gpio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ macro_rules! af {
713713
Index: marker::Index,
714714
{
715715
/// Configures the pin to operate as an alternate function push-pull output pin
716-
#[deprecated(since = "0.9.0", note = "Will be removed with the next version. Use `info_af_push_pull()` instead")]
716+
#[deprecated(since = "0.9.0", note = "Will be removed with the next version. Use `into_af_push_pull()` instead")]
717717
pub fn $into_afi_push_pull(
718718
self,
719719
moder: &mut Gpio::MODER,
@@ -724,7 +724,7 @@ macro_rules! af {
724724
}
725725

726726
/// Configures the pin to operate as an alternate function open-drain output pin
727-
#[deprecated(since = "0.9.0", note = "Will be removed with the next version. Use `info_af_open_drain()` instead")]
727+
#[deprecated(since = "0.9.0", note = "Will be removed with the next version. Use `into_af_open_drain()` instead")]
728728
pub fn $into_afi_open_drain(
729729
self,
730730
moder: &mut Gpio::MODER,

testsuite/tests/spi.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ mod tests {
5252
let spi_pins = SpiPair {
5353
0: gpioc
5454
.pc10
55-
.into_af6_push_pull(&mut gpioc.moder, &mut gpioc.otyper, &mut gpioc.afrh),
55+
.into_af_push_pull(&mut gpioc.moder, &mut gpioc.otyper, &mut gpioc.afrh),
5656
1: gpioc
5757
.pc11
58-
.into_af6_push_pull(&mut gpioc.moder, &mut gpioc.otyper, &mut gpioc.afrh),
58+
.into_af_push_pull(&mut gpioc.moder, &mut gpioc.otyper, &mut gpioc.afrh),
5959
2: gpioc
6060
.pc12
61-
.into_af6_push_pull(&mut gpioc.moder, &mut gpioc.otyper, &mut gpioc.afrh),
61+
.into_af_push_pull(&mut gpioc.moder, &mut gpioc.otyper, &mut gpioc.afrh),
6262
};
6363

6464
let spi = Spi::new(

testsuite/tests/uart.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,26 @@ mod tests {
121121
let serial_pair = SerialPair {
122122
0: gpioa
123123
.pa9
124-
.into_af7_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrh),
124+
.into_af_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrh),
125125
1: gpioa
126126
.pa10
127-
.into_af7_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrh),
127+
.into_af_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrh),
128128
};
129129
let cs_pair_1 = CrossSerialPair1 {
130130
0: gpioa
131131
.pa2
132-
.into_af7_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrl),
132+
.into_af_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrl),
133133
1: gpiob
134134
.pb11
135-
.into_af7_open_drain(&mut gpiob.moder, &mut gpiob.otyper, &mut gpiob.afrh),
135+
.into_af_open_drain(&mut gpiob.moder, &mut gpiob.otyper, &mut gpiob.afrh),
136136
};
137137
let cs_pair_2 = CrossSerialPair2 {
138138
0: gpiob
139139
.pb10
140-
.into_af7_push_pull(&mut gpiob.moder, &mut gpiob.otyper, &mut gpiob.afrh),
140+
.into_af_push_pull(&mut gpiob.moder, &mut gpiob.otyper, &mut gpiob.afrh),
141141
1: gpioa
142142
.pa3
143-
.into_af7_open_drain(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrl),
143+
.into_af_open_drain(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrl),
144144
};
145145

146146
let serial1 = Serial::new(

0 commit comments

Comments
 (0)