mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-24 23:08:08 +00:00
Update embedded-workshop-book/src/uarte-implementation.md
Co-authored-by: Jonathan Pallant <jonathan.pallant@ferrous-systems.com>
This commit is contained in:
parent
5e5ccb510b
commit
b09dd739f8
1 changed files with 3 additions and 1 deletions
|
@ -55,7 +55,9 @@ pub struct Uarte {
|
|||
✅ Create an instance of this struct in `fn init()` with the appropriate pins and configurations. Set the output pin's level to `Level::High`.
|
||||
Note, that the third and fourth pin are each wrapped in an `Option`.
|
||||
|
||||
✅ Create an interface to the UARTE1 instance with `uarte::Uarte::new(...)` that you bind to a variable. This instantiating method takes four arguments:
|
||||
✅ Create a Uarte driver with `hal::uarte::Uarte::new(...)` and bind it to a variable called `uarte` - we will stash this in our own `Uarte` struct later.
|
||||
|
||||
Creating the Uarte driver requires four arguments:
|
||||
* The `UARTE1` instance can be found in the `periph` variable.
|
||||
* Your instance of the `uarte::Pins` struct.
|
||||
* Set parity to `Parity::INCLUDED`
|
||||
|
|
Loading…
Reference in a new issue