aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Neyer <[email protected]>2022-11-15 10:07:35 +0100
committerJohannes Neyer <[email protected]>2022-11-15 10:10:36 +0100
commitea61c192807df7a1422ea04480cca0562cbc3bb2 (patch)
treea430cd7e465625fb478278eb4857ad228406098d
parentbcec55464f22069c45f07745efdd0fa45a4959c4 (diff)
[doc] Fix some grammar
-rw-r--r--docs/modules/ROOT/pages/basic_application.adoc2
-rw-r--r--docs/modules/ROOT/pages/layer_by_layer.adoc8
-rw-r--r--docs/modules/ROOT/pages/stm32.adoc4
3 files changed, 7 insertions, 7 deletions
diff --git a/docs/modules/ROOT/pages/basic_application.adoc b/docs/modules/ROOT/pages/basic_application.adoc
index f20ddf531..d233d77c1 100644
--- a/docs/modules/ROOT/pages/basic_application.adoc
+++ b/docs/modules/ROOT/pages/basic_application.adoc
@@ -61,7 +61,7 @@ async fn main(_spawner: Spawner, p: embassy_nrf::Peripherals) {
61} 61}
62``` 62```
63 63
64What happens when the `blinker` task have been spawned and main returns? Well, the main entry point is actually just like any other task, except that you can only have one and it takes some specific type arguments. The magic lies within the `#[embassy::main]` macro. The macro does the following: 64What happens when the `blinker` task has been spawned and main returns? Well, the main entry point is actually just like any other task, except that you can only have one and it takes some specific type arguments. The magic lies within the `#[embassy::main]` macro. The macro does the following:
65 65
66. Creates an Embassy Executor 66. Creates an Embassy Executor
67. Initializes the microcontroller HAL to get the `Peripherals` 67. Initializes the microcontroller HAL to get the `Peripherals`
diff --git a/docs/modules/ROOT/pages/layer_by_layer.adoc b/docs/modules/ROOT/pages/layer_by_layer.adoc
index a96dd9fe2..a78a64a97 100644
--- a/docs/modules/ROOT/pages/layer_by_layer.adoc
+++ b/docs/modules/ROOT/pages/layer_by_layer.adoc
@@ -8,7 +8,7 @@ The application we'll write is a simple 'push button, blink led' application, wh
8 8
9== PAC version 9== PAC version
10 10
11The PAC is the lowest API for accessing peripherals and registers, if you don't count reading/writing directly to memory addresses. It provide distinct types 11The PAC is the lowest API for accessing peripherals and registers, if you don't count reading/writing directly to memory addresses. It provides distinct types
12to make accessing peripheral registers easier, but it does not prevent you from writing unsafe code. 12to make accessing peripheral registers easier, but it does not prevent you from writing unsafe code.
13 13
14Writing an application using the PAC directly is therefore not recommended, but if the functionality you want to use is not exposed in the upper layers, that's what you need to use. 14Writing an application using the PAC directly is therefore not recommended, but if the functionality you want to use is not exposed in the upper layers, that's what you need to use.
@@ -20,13 +20,13 @@ The blinky app using PAC is shown below:
20include::example$layer-by-layer/blinky-pac/src/main.rs[] 20include::example$layer-by-layer/blinky-pac/src/main.rs[]
21---- 21----
22 22
23As you can see, there are a lot of code needed to enable the peripheral clocks, configuring the input pins and the output pins of the application. 23As you can see, a lot of code is needed to enable the peripheral clocks and to configure the input pins and the output pins of the application.
24 24
25Another downside of this application is that it is busy-looping while polling the button state. This prevents the microcontroller from utilizing any sleep mode to save power. 25Another downside of this application is that it is busy-looping while polling the button state. This prevents the microcontroller from utilizing any sleep mode to save power.
26 26
27== HAL version 27== HAL version
28 28
29To simplify our application, we can use the HAL instead. The HAL exposes higher level APIs that handle details such 29To simplify our application, we can use the HAL instead. The HAL exposes higher level APIs that handle details such as:
30 30
31* Automatically enabling the peripheral clock when you're using the peripheral 31* Automatically enabling the peripheral clock when you're using the peripheral
32* Deriving and applying register configuration from higher level types 32* Deriving and applying register configuration from higher level types
@@ -39,7 +39,7 @@ The HAL example is shown below:
39include::example$layer-by-layer/blinky-hal/src/main.rs[] 39include::example$layer-by-layer/blinky-hal/src/main.rs[]
40---- 40----
41 41
42As you can see, the application becomes a lot simpler, even without using any async code. The `Input` and `Output` hides all the details accessing the GPIO registers, and allow you to use a much simpler API to query the state of the button and toggle the LED output accordingly. 42As you can see, the application becomes a lot simpler, even without using any async code. The `Input` and `Output` types hide all the details of accessing the GPIO registers and allow you to use a much simpler API for querying the state of the button and toggling the LED output.
43 43
44The same downside from the PAC example still applies though: the application is busy looping and consuming more power than necessary. 44The same downside from the PAC example still applies though: the application is busy looping and consuming more power than necessary.
45 45
diff --git a/docs/modules/ROOT/pages/stm32.adoc b/docs/modules/ROOT/pages/stm32.adoc
index 8ed9ab04b..7bfc0592b 100644
--- a/docs/modules/ROOT/pages/stm32.adoc
+++ b/docs/modules/ROOT/pages/stm32.adoc
@@ -4,9 +4,9 @@ The link:https://github.com/embassy-rs/embassy/tree/master/embassy-stm32[Embassy
4 4
5== The infinite variant problem 5== The infinite variant problem
6 6
7STM32 microcontrollers comes in many families and flavors, and supporting all of them is a big undertaking. Embassy has taken advantage of the fact 7STM32 microcontrollers come in many families, and flavors and supporting all of them is a big undertaking. Embassy has taken advantage of the fact
8that the STM32 peripheral versions are shared across chip families. Instead of re-implementing the SPI 8that the STM32 peripheral versions are shared across chip families. Instead of re-implementing the SPI
9peripheral for every STM32 chip family, embassy have a single SPI implementation that depends on 9peripheral for every STM32 chip family, embassy has a single SPI implementation that depends on
10code-generated register types that are identical for STM32 families with the same version of a given peripheral. 10code-generated register types that are identical for STM32 families with the same version of a given peripheral.
11 11
12=== The metapac 12=== The metapac