Skip to content

Commit 03a510b

Browse files
luz pazRiksu9000
luz paz
authored andcommitted
Fix various typos
Found via `codespell -q 3 -S ./src/libs -L ans,doubleclick,trough`
1 parent 7f45538 commit 03a510b

21 files changed

+45
-45
lines changed

bootloader/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Integrating a BLE stack for the OTA functionality would have used to much memory
99

1010
When it is run, this bootloader looks in the SPI flash memory if a new firmware is available. It there is one, it *swaps* the current firmware with the new one (the new one is copied in the main flash memory, and the current one is copied in the SPI flash memory) and run the new one. If the new one fails to run properly, the bootloader is able to revert to the old one and mark the new one as not working.
1111

12-
As this bootloader does not provide any OTA capability, it is not able to actually download a new version of the application. Providing OTA functionality is thus the responsability of the application firmware.
12+
As this bootloader does not provide any OTA capability, it is not able to actually download a new version of the application. Providing OTA functionality is thus the responsibility of the application firmware.
1313

1414
# About MCUBoot
1515
MCUBoot is run at boot time. In normal operation, it just jumps to the reset handler of the application firmware to run it. Once the application firmware is running, MCUBoot does not run at all.
1616

1717
![MCUBoot boot sequence diagram](../doc/bootloader/boot.png "MCUBoot boot sequence diagram")
1818

19-
But MCUBoot does much more than that : it can upgrade the firmware that is currently running by a new one, and it is also able to revert to the previous version of the firmware in case the new one does not run propertly.
19+
But MCUBoot does much more than that : it can upgrade the firmware that is currently running by a new one, and it is also able to revert to the previous version of the firmware in case the new one does not run properly.
2020

2121
To do this, it uses 2 memory 'slots' :
2222
- **The primary slot** : it contains the current firmware, the one that will be executed by MCUBoot
@@ -40,7 +40,7 @@ This chapter describes degraded cases that are handled by our bootloader and tho
4040
Case | Current bootloader | Solution
4141
-----|--------------------|----------------------------------------------
4242
Data got corrupted during file transfer | [OK] Application firmware does a CRC check before applying the update, and does not proceed if it fails. | N/A
43-
New firmware does not run at all (bad file) (1) | [NOK] MCU executes unknown instructions and will most likely end up in an infinite loop or freeze in an error handler. The bootloader does not run, it can do nothing, the MCU is stucked until next reset | [OK] The bootloader starts the watchdog just before running the new firmware. This way, the watchdog will reset the MCU after ~7s because the firmware does not refresh it. Bootloader reverts to the previous version of the firmware during the reset.
43+
New firmware does not run at all (bad file) (1) | [NOK] MCU executes unknown instructions and will most likely end up in an infinite loop or freeze in an error handler. The bootloader does not run, it can do nothing, the MCU is stuck until next reset | [OK] The bootloader starts the watchdog just before running the new firmware. This way, the watchdog will reset the MCU after ~7s because the firmware does not refresh it. Bootloader reverts to the previous version of the firmware during the reset.
4444
New firmware runs, does not set the valid bit and does not refresh the watchdog | [NOK] The new firmware runs until the next reset. The bootloader will be able to revert to the previous firmware only during the next reset. If the new firmware does not run properly and does not reset, the bootloader can do nothing until the next reset | [OK] The bootloader starts the watchdog just before running the new firmware. This way, the watchdog will reset the MCU after ~7s because the firmware does not refresh it. Bootloader reverts to the previous version of the firmware during the reset.
4545
New firmware does not run properly, does not set the valid bit but refreshes the watchdog | [NOK] The bootloader will be able to revert to the previous firmware only during the next reset. If the new firmware does not run properly and does not reset, the bootloader can do nothing until the next reset | [~] Wait for the battery to drain. The CPU will reset the next time the device is charged and will be able to rollback to the previous version.
4646
New firmware does not run properly but sets the valid bit and refreshes the watchdog | [NOK] The bootloader won't revert to the previous version because the valid flag is set | [~] Wait for the battery to drain. The CPU will reset the next time the device is charged. Then, the bootloader must provide a way for the user to force the rollback to the previous version

bootloader/ota-dfu-python/ble_secure_dfu_controller.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def _dfu_send_init(self):
236236
self._dfu_send_command(Procedures.EXECUTE)
237237
self._wait_and_parse_notify()
238238

239-
print("Init packet successfully transfered")
239+
print("Init packet successfully transferred")
240240

241241
# --------------------------------------------------------------------------
242242
# Send the Firmware image to peripheral device.
@@ -319,5 +319,5 @@ def _dfu_send_object(self, offset, obj_max_size):
319319
self._dfu_send_command(Procedures.EXECUTE)
320320
self._wait_and_parse_notify()
321321

322-
# If everything executed correctly, return amount of bytes transfered
322+
# If everything executed correctly, return amount of bytes transferred
323323
return obj_max_size

cmake-nRF5x/readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ Cmake script for projects targeting Nordic Semiconductor nRF5x series devices us
77
The script makes use of the following tools:
88

99
- nRF5x SDK by Nordic Semiconductor - SoC specific drivers and libraries (also includes a lot of examples)
10-
- JLink by Segger - interface software for the JLink familiy of programmers
10+
- JLink by Segger - interface software for the JLink family of programmers
1111
- nrfjprog by Nordic Semiconductor - Wrapper utility around JLink
1212
- arm-non-eabi-gcc by ARM and the GCC Team - compiler toolchain for embedded (= bare metal) ARM chips
1313

1414
# Setup
1515

1616
1. Download this repo (or add as submodule) to the directory `cmake-nRF5x` in your project
1717

18-
1. Search the SDK `example` directory for a `sdk_config.h`, `main.c` and a linker script (normally named `<project_name>_gcc_<chip familly>.ld`) that fits your chip and project needs.
18+
1. Search the SDK `example` directory for a `sdk_config.h`, `main.c` and a linker script (normally named `<project_name>_gcc_<chip family>.ld`) that fits your chip and project needs.
1919

2020
1. Copy the `sdk_config.h` and the project `main.c` into a new directory `src`. Modify them as required for your project.
2121

22-
1. Copy the linker script into the root of your project. Rename it to just `gcc_<chip familly>.ld` For example:
22+
1. Copy the linker script into the root of your project. Rename it to just `gcc_<chip family>.ld` For example:
2323

2424
```
2525
gcc_nrf51.ld

doc/MemoryAnalysis.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Puncover is really easy to install:
6060
- Launch a browser at http://localhost:5000/
6161

6262
### Analysis
63-
Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, unsuprisingly, fonts and graphics are the largest use of flash memory.
63+
Using the MAP file and tools, we can easily see what symbols are using most of the flash memory. In this case, unsurprisingly, fonts and graphics are the largest use of flash memory.
6464

6565
![Puncover](./memoryAnalysis/puncover-all-symbols.png)
6666

@@ -150,7 +150,7 @@ You can then display the file using objdump:
150150
hexdump ram.bin -v | less
151151
```
152152

153-
The stack is positionned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000.
153+
The stack is positioned at the end of the RAM -> 0xFFFF. Its size is 8192 bytes, so the end of the stack is at 0xE000.
154154
On the following dump, the maximum stack usage is 520 bytes (0xFFFF - 0xFDF8):
155155

156156
```

doc/NavigationService.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The service UUID is 00010000-78fc-48fe-8e23-433b3a1942d0
1313

1414
## Characteristics
1515
## Flags (UUID 00010001-78fc-48fe-8e23-433b3a1942d0)
16-
All included icons are from pure-maps, which provides the actual routing from the client. The icon names ultimately come from the mapbox project "direction-icons", See https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation See the end of this document for the full lsit of supported icon names.
16+
All included icons are from pure-maps, which provides the actual routing from the client. The icon names ultimately come from the mapbox project "direction-icons", See https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation See the end of this document for the full list of supported icon names.
1717

1818
## Narrative (UUID 00010002-78fc-48fe-8e23-433b3a1942d0)
1919
This is a client supplied string describing the upcoming instruction such as "At the roundabout take the first exit".

doc/PinetimeStubWithNrf52DK.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build a stub for PineTime using NRF52-DK
2-
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official developpment kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
2+
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official development kit for the NRF52832 SoC from Nordic Semiconductor used in the PineTime.
33

44
This development kit can be very useful for PineTime development:
55
* You can use its embedded JLink SWD programmer/debugger to program and debug your code on the PineTime

doc/ble.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ When starting, the firmware starts BLE advertising. It sends small messages that
4444

4545
A companion application (running on a PC, Raspberry Pi, smartphone, etc.) which receives this advertising packet can request a connection to the device. This connection procedure allows the 2 devices to negotiate communication parameters, security keys, etc.
4646

47-
When the connection is established, the PineTime will try to discover services running on the companion application. For now **CTS** (**C**urrent **T**ime **S**ervice) and **ANS** (**A**lert **N**otification **S**ervice) are supported.
47+
When the connection is established, the PineTime will try to discover services running on the companion application. For now **CTS** (**C**urrent **T**ime **S**ervice) and **ANS** (**A**lert **N**notification **S**ervice) are supported.
4848

4949
If **CTS** is detected, it'll request the current time to the companion application. If **ANS** is detected, it will listen to new notifications coming from the companion application.
5050

@@ -146,14 +146,14 @@ The new alert characteristic allows sending new notifications to InfiniTime. It
146146
For example, here is what a normal notification looks like in Golang (language of `itd`):
147147

148148
```go
149-
// \x00 is the category for simple alert, and there is one new notifcation, hence \x01.
149+
// \x00 is the category for simple alert, and there is one new notification, hence \x01.
150150
"\x00\x01\x00Test Title\x00Test Body"
151151
```
152152

153153
A call notification looks like so:
154154

155155
```go
156-
// \x03 is the category for calls, and there is one new call notifcation, hence \x01.
156+
// \x03 is the category for calls, and there is one new call notification, hence \x01.
157157
"\x03\x01\x00Mary"
158158
```
159159

doc/ble/connection_sequence.puml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Pinetime --> CompanionApp: Start advertising
33

44
group BLE Connection
55
CompanionApp -> Pinetime: Connection request
6-
CompanionApp <-> Pinetime: Connection parameters negociation, security procedure,...
6+
CompanionApp <-> Pinetime: Connection parameters negotiation, security procedure,...
77
end
88

99
group Service Discovery

doc/branches.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The project is based on 2 main branches:
55
- **master** : this branch is always ready to be deployed. It means that at any time, we should be able to build the branch and release a new version of the application.
66
- **develop** : this branch contains the latest development that will be integrated in the next release once it's considered as stable.
77

8-
New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is succesfully reviewed and accepted.
8+
New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is successfully reviewed and accepted.
99

1010
To release a new version of the application, when develop is considered stable, a **release** branch is created from **develop**. This can be considered as a *release candidate* branch. When everything is OK, this release branch is merged into **master** and the release is generated (a tag is applied to git, the release note is finalized, binaries are built,...) from **master**.
1111

doc/buildAndProgram.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ By default, this variable is set to *Release*. It compiles the code with size an
4747
The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you'll need to disable some parts of the code. For example, the icons for the **Navigation** app use a lot of memory space. You can comment the content of `m_iconMap` in the [Navigation](https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/src/displayapp/screens/Navigation.h#L148) application to free some memory.
4848

4949
####(**) Note about **BUILD_DFU**:
50-
DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mecanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
50+
DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mechanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
5151
5252
#### CMake command line for JLink
5353
```

nrf52.svd

+2-2
Original file line numberDiff line numberDiff line change
@@ -13659,12 +13659,12 @@ POSSIBILITY OF SUCH DAMAGE.\n
1365913659
<usage>read</usage>
1366013660
<enumeratedValue>
1366113661
<name>NotPresent</name>
13662-
<description>Read: no overrun occured</description>
13662+
<description>Read: no overrun occurred</description>
1366313663
<value>0</value>
1366413664
</enumeratedValue>
1366513665
<enumeratedValue>
1366613666
<name>Present</name>
13667-
<description>Read: overrun occured</description>
13667+
<description>Read: overrun occurred</description>
1366813668
<value>1</value>
1366913669
</enumeratedValue>
1367013670
</enumeratedValues>

src/components/ble/DfuService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ int DfuService::ControlPointHandler(uint16_t connectionHandle, os_mbuf* om) {
246246
NRF_LOG_INFO("[DFU] -> Receive firmware image requested, but we are not in Start Init");
247247
return 0;
248248
}
249-
// TODO the chunk size is dependant of the implementation of the host application...
249+
// TODO the chunk size is dependent of the implementation of the host application...
250250
dfuImage.Init(20, applicationSize, expectedCrc);
251251
NRF_LOG_INFO("[DFU] -> Starting receive firmware");
252252
state = States::Data;

src/components/ble/FSService.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
8181
return -1;
8282
}
8383
memcpy(filepath, header->pathstr, plen);
84-
filepath[plen] = 0; // Copy and null teminate string
84+
filepath[plen] = 0; // Copy and null terminate string
8585
ReadResponse resp;
8686
os_mbuf* om;
8787
resp.command = commands::READ_DATA;
@@ -148,7 +148,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
148148
return -1; // TODO make this actually return a BLE notif
149149
}
150150
memcpy(filepath, header->pathstr, plen);
151-
filepath[plen] = 0; // Copy and null teminate string
151+
filepath[plen] = 0; // Copy and null terminate string
152152
fileSize = header->totalSize;
153153
WriteResponse resp;
154154
resp.command = commands::WRITE_PACING;
@@ -193,7 +193,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
193193
uint16_t plen = header->pathlen;
194194
char path[plen + 1] = {0};
195195
memcpy(path, header->pathstr, plen);
196-
path[plen] = 0; // Copy and null teminate string
196+
path[plen] = 0; // Copy and null terminate string
197197
DelResponse resp {};
198198
resp.command = commands::DELETE_STATUS;
199199
int res = fs.FileDelete(path);
@@ -208,7 +208,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
208208
uint16_t plen = header->pathlen;
209209
char path[plen + 1] = {0};
210210
memcpy(path, header->pathstr, plen);
211-
path[plen] = 0; // Copy and null teminate string
211+
path[plen] = 0; // Copy and null terminate string
212212
MKDirResponse resp {};
213213
resp.command = commands::MKDIR_STATUS;
214214
resp.modification_time = 0;
@@ -223,7 +223,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
223223
ListDirHeader* header = (ListDirHeader*) om->om_data;
224224
uint16_t plen = header->pathlen;
225225
char path[plen + 1] = {0};
226-
path[plen] = 0; // Copy and null teminate string
226+
path[plen] = 0; // Copy and null terminate string
227227
memcpy(path, header->pathstr, plen);
228228

229229
ListDirResponse resp {};
@@ -290,7 +290,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
290290
header->pathstr[plen] = 0;
291291
char path[header->NewPathLength + 1] = {0};
292292
memcpy(path, &header->pathstr[plen + 1], header->NewPathLength);
293-
path[header->NewPathLength] = 0; // Copy and null teminate string
293+
path[header->NewPathLength] = 0; // Copy and null terminate string
294294
MoveResponse resp {};
295295
resp.command = commands::MOVE_STATUS;
296296
int8_t res = (int8_t) fs.Rename(header->pathstr, path);

src/displayapp/LittleVgl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ void LittleVgl::FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
9494
uint16_t y1, y2, width, height = 0;
9595

9696
ulTaskNotifyTake(pdTRUE, 200);
97-
// NOtification is still needed (even if there is a mutex on SPI) because of the DataCommand pin
98-
// which cannot be set/clear during a transfert.
97+
// Notification is still needed (even if there is a mutex on SPI) because of the DataCommand pin
98+
// which cannot be set/clear during a transfer.
9999

100100
if ((scrollDirection == LittleVgl::FullRefreshDirections::Down) && (area->y2 == visibleNbLines - 1)) {
101101
writeOffset = ((writeOffset + totalNbLines) - visibleNbLines) % totalNbLines;

src/displayapp/fonts/generate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def main():
4343
if not os.path.exists(args.config):
4444
sys.exit(f'Error: the config file {args.config} does not exist.')
4545
if not os.access(args.config, os.R_OK):
46-
sys.exit(f'Error: the config file {args.config} is not accessable (permissions?).')
46+
sys.exit(f'Error: the config file {args.config} is not accessible (permissions?).')
4747
with open(args.config, 'r') as fd:
4848
data = json.load(fd)
4949

src/displayapp/screens/Screen.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace Pinetime {
3535

3636
private:
3737
T value {}; // NSDMI - default initialise type
38-
bool isUpdated {true}; // NSDMI - use brace initilisation
38+
bool isUpdated {true}; // NSDMI - use brace initialisation
3939
};
4040

4141
class Screen {

src/drivers/Bma421_C/bma4.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ static int8_t get_average_of_sensor_data(uint8_t accel_en,
621621
*
622622
* @param[in] accel_en : Variable to store status of accel
623623
* @param[in] accel_g_axis : Accel axis to FOC
624-
* @param[in] avg_foc_data : Average value of sensor sample datas
624+
* @param[in] avg_foc_data : Average value of sensor sample data
625625
* @param[in] dev : Structure instance of bma4_dev.
626626
*
627627
* @return Result of API execution status
@@ -637,7 +637,7 @@ static int8_t validate_foc_position(uint8_t accel_en,
637637
/*!
638638
* @brief This internal API validates accel FOC axis given as input
639639
*
640-
* @param[in] avg_foc_data : Average value of sensor sample datas
640+
* @param[in] avg_foc_data : Average value of sensor sample data
641641
* @param[in] dev : Structure instance of bma4_dev.
642642
*
643643
* @return Result of API execution status

0 commit comments

Comments
 (0)