From f384d99d78d84c5eb75d4d5bd978e68f0e7d2f41 Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Wed, 4 Apr 2018 20:41:33 +0200 Subject: [PATCH] minor style fixes --- 03_uart1/README.md | 12 ++++-------- 04_mailboxes/README.md | 2 +- 05_uart0/README.md | 19 ++++++++----------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/03_uart1/README.md b/03_uart1/README.md index d541800d..4acb10f2 100644 --- a/03_uart1/README.md +++ b/03_uart1/README.md @@ -1,13 +1,11 @@ -Tutorial 03 - UART1, Auxilary mini UART -======================================= +# Tutorial 03 - UART1, Auxilary mini UART It is time for the famous Hello World example. We're going to write on the UART1 first, as it's easier to program as it has a fixed clocked frequency. NOTE: qemu does not redirect UART1 to terminal by default, only UART0! -gpio.rs ------- +## gpio.rs We have a new header file. This defines the base MMIO address, and the GPIO controller's addresses. This file going to be very popular, as many device needs @@ -19,8 +17,7 @@ UART registers. [volatile_register]: https://docs.rs/volatile-register/0.2.0/volatile_register/ -uart.rs --------------- +## uart.rs A very minimal implementation. @@ -34,8 +31,7 @@ will be converted into a newline character (10). `MiniUart::puts(&self, string: &str)` prints out a string. On newline, a carrige return character will also be sent (13 + 10). -Main ----- +## main.rs First we have to call the uart initialization code. Then we wait for the first keypress from the user before we say "Hello Rustacean!". If you've purchased an diff --git a/04_mailboxes/README.md b/04_mailboxes/README.md index 1f8941e7..6bbbac2a 100644 --- a/04_mailboxes/README.md +++ b/04_mailboxes/README.md @@ -68,6 +68,6 @@ instructions] to prevent this behavior would be needed. [fence]: https://doc.rust-lang.org/std/sync/atomic/fn.fence.html [emits corresponding CPU instructions]: https://developer.arm.com/products/architecture/a-profile/docs/100941/latest/barriers -## Main +## main.rs We query the board's serial number and then we display it on the serial console. diff --git a/05_uart0/README.md b/05_uart0/README.md index 6a68171a..40e8bb8d 100644 --- a/05_uart0/README.md +++ b/05_uart0/README.md @@ -1,8 +1,7 @@ -Tutorial 05 - UART0, PL011 -========================== +# Tutorial 05 - UART0, PL011 -This tutorial does the same as tutorial 04, but it prints the serial number on UART0. As such, it can be used -easily with qemu, like +This tutorial does the same as tutorial 04, but it prints the serial number on +UART0. As such, it can be used easily with qemu, like ```sh $ make # To build the kernel @@ -12,14 +11,12 @@ Hello Rustacean! My serial number is: 0000000000000000 ``` -uart.rs --------------- +## uart.rs -Before we could use a rate divisor value, we must establish a valid clock rate for the PL011. It's done -via mailboxes, with the same property channel we used earlier. Otherwise this interface is identical to the -UART1 one. +Before we could use a rate divisor value, we must establish a valid clock rate +for the PL011. It's done via mailboxes, with the same property channel we used +earlier. Otherwise this interface is identical to the UART1 one. -Main ----- +## main.rs We query the board's serial number and then we display it on the serial console.