Skip to content

Commit a5af849

Browse files
Serial::usart1/2/3 -> Serial::new
1 parent 35736cd commit a5af849

11 files changed

+55
-74
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1212
### Breaking changes
1313

1414
- Passing the `Clock` parameter to `Serial` by reference
15+
- `Serial::usart1/2/3` -> `Serial::new`
1516

1617
## [v0.9.0] - 2022-03-02
1718

examples/serial-dma-circ.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn main() -> ! {
4848
// let tx = gpiob.pb10.into_alternate_push_pull(&mut gpiob.crh);
4949
// let rx = gpiob.pb11;
5050

51-
let serial = Serial::usart1(
51+
let serial = Serial::new(
5252
p.USART1,
5353
(tx, rx),
5454
&mut afio.mapr,

examples/serial-dma-peek.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() -> ! {
4747
// let tx = gpiob.pb10.into_alternate_push_pull(&mut gpiob.crh);
4848
// let rx = gpiob.pb11;
4949

50-
let serial = Serial::usart1(
50+
let serial = Serial::new(
5151
p.USART1,
5252
(tx, rx),
5353
&mut afio.mapr,

examples/serial-dma-rx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() -> ! {
4747
// let tx = gpiob.pb10.into_alternate_push_pull(&mut gpiob.crh);
4848
// let rx = gpiob.pb11;
4949

50-
let serial = Serial::usart1(
50+
let serial = Serial::new(
5151
p.USART1,
5252
(tx, rx),
5353
&mut afio.mapr,

examples/serial-dma-tx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() -> ! {
4747
// let tx = gpiob.pb10.into_alternate_push_pull(&mut gpiob.crh);
4848
// let rx = gpiob.pb11;
4949

50-
let serial = Serial::usart1(
50+
let serial = Serial::new(
5151
p.USART1,
5252
(tx, rx),
5353
&mut afio.mapr,

examples/serial-fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn main() -> ! {
5959

6060
// Set up the usart device. Taks ownership over the USART register and tx/rx pins. The rest of
6161
// the registers are used to enable and configure the device.
62-
let serial = Serial::usart3(
62+
let serial = Serial::new(
6363
p.USART3,
6464
(tx, rx),
6565
&mut afio.mapr,

examples/serial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn main() -> ! {
6060

6161
// Set up the usart device. Taks ownership over the USART register and tx/rx pins. The rest of
6262
// the registers are used to enable and configure the device.
63-
let mut serial = Serial::usart3(
63+
let mut serial = Serial::new(
6464
p.USART3,
6565
(tx, rx),
6666
&mut afio.mapr,

examples/serial_9bits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn main() -> ! {
117117

118118
// Set up the usart device. Taks ownership over the USART register and tx/rx pins. The rest of
119119
// the registers are used to enable and configure the device.
120-
let serial = Serial::usart3(
120+
let serial = Serial::new(
121121
p.USART3,
122122
(tx_pin, rx_pin),
123123
&mut afio.mapr,

examples/serial_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn main() -> ! {
5858

5959
// Set up the usart device. Taks ownership over the USART register and tx/rx pins. The rest of
6060
// the registers are used to enable and configure the device.
61-
let serial = Serial::usart3(
61+
let serial = Serial::new(
6262
p.USART3,
6363
(tx, rx),
6464
&mut afio.mapr,

examples/serial_reconfigure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn main() -> ! {
6060

6161
// Set up the usart device. Taks ownership over the USART register and tx/rx pins. The rest of
6262
// the registers are used to enable and configure the device.
63-
let mut serial = Serial::usart3(
63+
let mut serial = Serial::new(
6464
p.USART3,
6565
(tx, rx),
6666
&mut afio.mapr,

0 commit comments

Comments
 (0)