Skip to content

Commit 492afbc

Browse files
authored
Merge pull request #734 from Alejandro-Casanova/fix-typos-and-md-format-in-examples
Continue with corrections to examples
2 parents 30821e6 + fd55d6b commit 492afbc

12 files changed

Lines changed: 32 additions & 25 deletions

File tree

examples/chapter02_03/readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Example chapter02_03
2+
23
## The LED program with timing
34

45
This example implements the LED program (with timing) for the
@@ -12,7 +13,7 @@ Building the example can be done with GNUmake
1213
in the command batch or shell script.
1314
The results of the build will be stored in the `bin`
1415
directory. After successful build, files such as the HEX-file
15-
`led.hex` and othe name and map files can be found in `bin`.
16+
`led.hex` and the name and map files can be found in `bin`.
1617

1718
## With `GNUmake`
1819

@@ -38,9 +39,9 @@ VC as well as Atmel Studio.
3839

3940
In the LED program with timing, the blinking is controlled directly
4041
from the `main` subroutine of the program. The blinking
41-
frequency is approximately 1/2Hz, controlled by a timer dely.
42+
frequency is approximately 1/2Hz, controlled by a timer delay.
4243
The blinking loop can be found in the file `sys_start.cpp`.
43-
It is reproduced below within its contect in `main`.
44+
It is reproduced below within its context in `main`.
4445
Please note the MCAL initialization, which is essential
4546
for initializing clocks and interrupts. It is this layer
4647
that needs to be modified when porting to other microcontroller

examples/chapter02_03a/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Example chapter02_03a
2+
23
## The LED program with cooperative multitasking scheduler
34

45
This example implements the LED program with
55.7 KB
Loading
1.11 MB
Loading
816 KB
Loading
317 KB
Loading

examples/chapter02_06/readme.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Example chapter02_06
2+
23
## The Led Program (with template LED class)
34

45
This example implements the LED program with a template
@@ -24,15 +25,15 @@ to capture the runtime of the port toggle.
2425
The toggle signal has a width of approximately
2526
$310~\text{ns}$, which agrees well with the claim in the book.
2627

27-
![](./images/2020-01-12.pdf)
28+
![port signal measured on oscilloscope](./images/2020-01-12.png)
2829

2930
The toggle signal having a width of approximately $310~\text{ns}$
3031
captured by a digital oscilloscope is shown.
3132

3233
Manually measuring the toggle signal with a _scope_ might require laboratory skill,
33-
as shown in the next two pictures featuring a hand-help oscilloscope
34+
as shown in the next two pictures featuring a hand-held oscilloscope
3435
probe measurement on one of our self-made Arduino-like boards.
3536

36-
![](./images/measurement.pdf)
37+
![hand-held measurement with oscilloscope](./images/measurement.png)
3738

38-
![](./images/measurement2.pdf)
39+
![closer view of oscilloscope measurement](./images/measurement2-cropped.png)

examples/chapter03_02/readme.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Example Chapter03_02
2+
23
## Integer Types Having Fixed Widths and Prime Numbers
34

45
<p align="center">
5-
<a href="https://godbolt.org/z/dPbM7v4ff" alt="godbolt">
6-
<img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" /></a>
6+
<a href="https://godbolt.org/z/dPbM7v4ff">
7+
<img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" alt="godbolt" /></a>
78
</p>
89

910
Example chapter03_02 focuses on integer types having fixed widths.
1011
The example gets into a fascinating calculation of prime numbers
11-
that is simultaneously intended to emphasize the usefullness
12+
that is simultaneously intended to emphasize the usefulness
1213
and portability of fixed-width integer types.
1314

1415
## Fixed-Width Integer Types
@@ -50,7 +51,7 @@ with the input `Prime[100]`.
5051

5152
The example begins by querying the number of entries required
5253
in the sieve to calculate the prime 541. For this, a simple divergent
53-
asymptotic series approximation of the lograithmic integral function is used.
54+
asymptotic series approximation of the logarithmic integral function is used.
5455
Instead of 100, the approximation returns 108, which is
5556
adequately close to the desired limit and large enough.
5657

@@ -70,17 +71,17 @@ The approximate runtime of each task call required for the
7071
entire sieve calculation of $100$ prime numbers is approximately $5\text{ms}$.
7172

7273
A debug port, in this case `portd.3` is toggled high and low
73-
just prior to and after the call of the prime sieve cacle task.
74-
A straightofrward digital oscilloscope measurement provides
74+
just prior to and after the call of the prime sieve cycle task.
75+
A straightforward digital oscilloscope measurement provides
7576
a timing indication for the runtime of the prime sieve cycle task.
7677

7778
A running hardware setup is shown in the picture below.
7879

79-
![](./images/board03_02.jpg)
80+
![running hardware setup](./images/board03_02.jpg)
8081

8182
The runtime of the prime sieve cycle task is depicted below.
8283

83-
![](./images/scope03_02.jpg)
84+
![runtime curve on oscilloscope](./images/scope03_02.jpg)
8485

8586
## A PC-Based example
8687

@@ -124,7 +125,7 @@ at this numerical point?
124125

125126
Consider the following input.
126127

127-
```
128+
```text
128129
N[(LogIntegral[10006721] - LogIntegral[2])/664999, 20]
129130
```
130131

examples/chapter04_04/readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Example Chapter04_04
2+
23
## LED Objects and Polymorphism
34

45
Example chapter04_04 uses an intuitive LED class hierarchy
@@ -109,7 +110,7 @@ as shown in the following table.
109110
| LED4 | port expander pin `GPA2` | port toggle high/low, SPI software drive, $750~\Omega$ |
110111

111112
In this example, we use ports from both the microcontroller as well
112-
as an external port expander chip. Hardware adressing is used
113+
as an external port expander chip. Hardware addressing is used
113114
on the port expander chip. The port expander address is
114115
hard-wired to the value 7 via connecting each of the three
115116
pins `A0` ... `A2` to $+{5}~\text{V}$.
@@ -134,4 +135,4 @@ The connections of the port expander chip are tabulated below.
134135

135136
The hardware setup is pictured in the image below.
136137

137-
![](./images/board4.jpg)
138+
![hardware setup](./images/board4.jpg)

examples/chapter04_04a/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Example Chapter04_04a
2+
23
## LED Objects and Polymorphism via References
34

45
Example chapter04_04a implements the same basic functionality

0 commit comments

Comments
 (0)