Skip to content

Commit 897fcf5

Browse files
bors[bot]burrbull
andauthored
Merge #347
347: typos r=eldruin a=burrbull Co-authored-by: Andrey Zgarbul <[email protected]>
2 parents 701d155 + d6f098e commit 897fcf5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/start/exceptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ possible.
5050
> Note that the `exception` attribute transforms definitions of static variables
5151
> inside the function by wrapping them into `unsafe` blocks and providing us
5252
> with new appropriate variables of type `&mut` of the same name.
53-
> Thus we can derefence the reference via `*` to access the values of the variables without
53+
> Thus we can dereference the reference via `*` to access the values of the variables without
5454
> needing to wrap them in an `unsafe` block.
5555
5656
## A complete example
@@ -258,7 +258,7 @@ ResetTrampoline:
258258
800094c: b #-0x4 <ResetTrampoline+0xa>
259259
```
260260

261-
You can lookup the value of the program counter `0x0800094a` in the dissassembly.
261+
You can lookup the value of the program counter `0x0800094a` in the disassembly.
262262
You'll see that a load operation (`ldr r0, [r0]` ) caused the exception.
263263
The `r0` field of `ExceptionFrame` will tell you the value of register `r0`
264264
was `0x3fff_fffe` at that time.

src/start/registers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pwm0.enable.write(temp); // Uh oh! Wrong variable!
134134

135135
## Using a HAL crate
136136

137-
The HAL crate for a chip typically works by implementing a custom Trait for the raw structures exposed by the PAC. Often this trait will define a function called `constrain()` for single peripherals or `split()` for things like GPIO ports with multiple pins. This function will consume the underlying raw peripheral structure and return a new object with a higher-level API. This API may also do things like have the Serial port `new` function require a borrow on some `Clock` structure, which can only be generated by calling the function which configures the PLLs and sets up all the clock frequencies. In this way, it is statically impossible to create a Serial port object without first having configured the clock rates, or for the Serial port object to mis-convert the baud rate into clock ticks. Some crates even define special traits for the states each GPIO pin can be in, requiring the user to put a pin into the correct state (say, by selecting the appropriate Alternate Function Mode) before passing the pin into Peripheral. All with no run-time cost!
137+
The HAL crate for a chip typically works by implementing a custom Trait for the raw structures exposed by the PAC. Often this trait will define a function called `constrain()` for single peripherals or `split()` for things like GPIO ports with multiple pins. This function will consume the underlying raw peripheral structure and return a new object with a higher-level API. This API may also do things like have the Serial port `new` function require a borrow on some `Clock` structure, which can only be generated by calling the function which configures the PLLs and sets up all the clock frequencies. In this way, it is statically impossible to create a Serial port object without first having configured the clock rates, or for the Serial port object to misconvert the baud rate into clock ticks. Some crates even define special traits for the states each GPIO pin can be in, requiring the user to put a pin into the correct state (say, by selecting the appropriate Alternate Function Mode) before passing the pin into Peripheral. All with no run-time cost!
138138

139139
Let's see an example:
140140

0 commit comments

Comments
 (0)