mirror of
https://github.com/nkbai/book.git
synced 2026-09-04 05:32:47 +08:00
Added layer diagram for embedded-hal use
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
This commit is contained in:
1
src/assets/rust_layers.svg
Normal file
1
src/assets/rust_layers.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 15 KiB |
@@ -20,6 +20,10 @@ How do we do this in Rust? Enter **embedded-hal**...
|
||||
|
||||
In a nutshell it is a set of traits which define implementation contracts between **HAL implementations**, **drivers** and **applications (or firmwares)**. Those contracts include both capabilities (i.e. if a trait is implemented for a certain type, the **HAL implementation** provides a certain capability) and methods (i.e. if you can construct a type implementing a trait it is guarenteed that you have the methods specified in the trait available).
|
||||
|
||||
A typical layering might look like this:
|
||||
|
||||

|
||||
|
||||
Some of the defined traits in **embedded-hal** are:
|
||||
* GPIO (input and output pins)
|
||||
* Serial communication
|
||||
|
||||
Reference in New Issue
Block a user