ESP32H2: Improve examples documentation (#598)

* style: 🎨 Improve print format

* docs: 📝 Update advanced_serial documentation

* docs: 📝 Update examples documentation
This commit is contained in:
Sergio Gasquez Arcos 2023-06-19 16:14:12 +02:00 committed by GitHub
parent a941e6f8a5
commit e3b77418c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 8 deletions

View File

@ -2,6 +2,10 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO16
//! - RX => GPIO17
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -71,7 +75,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }

View File

@ -2,6 +2,10 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -72,7 +76,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }

View File

@ -2,6 +2,10 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -79,7 +83,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }

View File

@ -2,6 +2,10 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -80,7 +84,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }

View File

@ -2,6 +2,14 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -80,7 +88,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }

View File

@ -1,3 +1,5 @@
//! Encrypt/Decrypt a message using AES
#![no_std] #![no_std]
#![no_main] #![no_main]
use aes::{ use aes::{

View File

@ -1,7 +1,7 @@
//! Uses timer0 and operator0 of the MCPWM0 //! Uses timer0 and operator0 of the MCPWM0
//! //!
//! to output a 50% duty //! to output a 50% duty
//! signal at 16 kHz. //! signal at 20 kHz.
//! //!
//! The signal will be output to the pin assigned to `pin`. (GPIO4) //! The signal will be output to the pin assigned to `pin`. (GPIO4)

View File

@ -2,6 +2,10 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -71,7 +75,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }

View File

@ -2,6 +2,10 @@
//! You can short the TX and RX pin and see it reads what was written. //! You can short the TX and RX pin and see it reads what was written.
//! Additionally you can connect a logic analzyer to TX and see how the changes //! Additionally you can connect a logic analzyer to TX and see how the changes
//! of the configuration change the output signal. //! of the configuration change the output signal.
//!
//! The following wiring is assumed:
//! - TX => GPIO1
//! - RX => GPIO2
#![no_std] #![no_std]
#![no_main] #![no_main]
@ -71,7 +75,7 @@ fn main() -> ! {
let read = block!(serial1.read()); let read = block!(serial1.read());
match read { match read {
Ok(read) => println!("Read {:02x}", read), Ok(read) => println!("Read 0x{:02x}", read),
Err(err) => println!("Error {:?}", err), Err(err) => println!("Error {:?}", err),
} }