minor style fixes

pull/4/head
Andre Richter 6 years ago
parent c0b1e92b7e
commit f384d99d78

@ -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

@ -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.

@ -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.

Loading…
Cancel
Save