diff --git a/examples/bare7.rs b/examples/bare7.rs index d343ad0734752989aa20e511b1389af78708ca0d..e43cd841e48101b123711a68b11d8762fbd99f56 100644 --- a/examples/bare7.rs +++ b/examples/bare7.rs @@ -1,5 +1,5 @@ //! bare7.rs -//! +//! //! Serial echo //! //! What it covers: @@ -40,6 +40,7 @@ fn main() -> ! { let tx = gpioa.pa2.into_alternate_af7(); let rx = gpioa.pa3.into_alternate_af7(); // try comment out + // let rx = gpioa.pa3.into_alternate_af6(); // try uncomment let serial = Serial::usart2( @@ -58,7 +59,7 @@ fn main() -> ! { match block!(rx.read()) { Ok(byte) => { iprintln!(stim, "Ok {:?}", byte); - tx.write(byte).unwrap(); + tx.write(byte).unwrap(); } Err(err) => { iprintln!(stim, "Error {:?}", err); @@ -94,20 +95,20 @@ fn main() -> ! { // > cargo build --example bare7 --features "stm32fxx-hal" // (or use the vscode build task) // -// +// // Cargo.toml: -// +// // [dependencies.stm32f4] // version = "0.5.0" // features = ["stm32f413", "rt"] // optional = true -// +// // [dependencies.stm32f4xx-hal] // version = "0.6.0" // features = ["stm32f401", "rt"] // optional = true // -// Notice, stm32f4xx-hal internally enables the dependency to stm32f4, +// Notice, stm32f4xx-hal internally enables the dependency to stm32f4, // so we don't need to explicitly enable it. // // The HAL provides a generic abstraction over the whole stm32f4 family. @@ -178,14 +179,14 @@ fn main() -> ! { // Data Bits 8 // Stop Bits 1 // Parity None -// +// // This setting is typically abbreviated as 115200 8N1. // // Run the example, make sure your ITM is set to 84MHz. // // Send a single character (byte), (set the option No end in moserial). // Verify that sent bytes are echoed back, and that ITM tracing is working. -// +// // If not go back check your ITM setting, clocks etc. // // Try sending: "abcd" as a single sequence, don't send the quotation marks, just abcd. @@ -204,7 +205,7 @@ fn main() -> ! { // What did you receive, and what was the output of the ITM trace. // // ** your answer here ** -// +// // Explain why the buffer overflows. // // ** your answer here ** @@ -220,8 +221,8 @@ fn main() -> ! { // The `stm32f4xx-hal` gives you an abstraction for programming, // setting up clocks, assigning pins, etc. // -// The hal overs basic functionality like serial communication. -// Still, in order to fully understand what is going on under the hood you need to +// The hal overs basic functionality like serial communication. +// Still, in order to fully understand what is going on under the hood you need to // check the documentation (data sheets, user manuals etc.) // // Your crate can be documented by: