Skip to content
This repository was archived by the owner on Aug 9, 2022. It is now read-only.

Commit c198a60

Browse files
committed
Minor cleanup
1 parent 460fc7e commit c198a60

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/serial.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(asm)]
43

54
use core::{fmt::Write, panic::PanicInfo};
65

@@ -83,8 +82,8 @@ fn main() -> ! {
8382
}
8483
}
8584

86-
/// Basic panic handler - just loops
8785
#[panic_handler]
88-
fn panic(_info: &PanicInfo) -> ! {
86+
fn panic(info: &PanicInfo) -> ! {
87+
dprintln!("\n\n*** {:?}", info);
8988
loop {}
9089
}

src/serial.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ pub mod config {
143143
pub struct Pins<
144144
TX: OutputPin,
145145
RX: InputPin,
146+
// default pins to allow type inference
146147
CTS: InputPin = crate::gpio::Gpio19<crate::gpio::Input<crate::gpio::Floating>>,
147148
RTS: OutputPin = crate::gpio::Gpio22<crate::gpio::Output<crate::gpio::PushPull>>,
148149
> {
@@ -158,6 +159,7 @@ pub struct Serial<
158159
UART: Instance,
159160
TX: OutputPin,
160161
RX: InputPin,
162+
// default pins to allow type inference
161163
CTS: InputPin = crate::gpio::Gpio19<crate::gpio::Input<crate::gpio::Floating>>,
162164
RTS: OutputPin = crate::gpio::Gpio22<crate::gpio::Output<crate::gpio::PushPull>>,
163165
> {

0 commit comments

Comments
 (0)