Skip to content

Commit d255416

Browse files
authored
Merge pull request #21 from arduino/ci-spell-check
[CI] add spell-check action for checking spelling, grammar, etc.
2 parents 3e865d2 + d75647c commit d255416

File tree

9 files changed

+41
-9
lines changed

9 files changed

+41
-9
lines changed

.codespellrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
2+
# See: https://github.com/codespell-project/codespell#using-a-config-file
3+
[codespell]
4+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
5+
ignore-words-list = hsi,
6+
skip = ./.git,./.licenses,__pycache__,node_modules,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock,./libraries
7+
builtin = clear,informal,en-GB_to_en-US
8+
check-filenames =
9+
check-hidden =

.github/workflows/spell-check.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
spellcheck:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:floppy_disk: `portentax8-stm32h7-fw`
22
=====================================
33
[![Smoke test status](https://github.com/arduino/portentax8-stm32h7-fw/actions/workflows/smoke-test.yml/badge.svg)](https://github.com/arduino/portentax8-stm32h7-fw/actions/workflows/smoke-test.yml)
4+
[![Spell Check status](https://github.com/arduino/portentax8-stm32h7-fw/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/portentax8-stm32h7-fw/actions/workflows/spell-check.yml)
45
[![Sync Labels status](https://github.com/arduino/portentax8-stm32h7-fw/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/arduino/portentax8-stm32h7-fw/actions/workflows/sync-labels.yml)
56

67
This repository contains the firmware running on the `STM32H747AIIX`/Cortex-M7 core which, in combination with loadable kernel modules within the Linux distribution, provides access to various IO busses on the expansion headers of the Portenta X8.
@@ -33,7 +34,7 @@ cd /usr/arduino/extra
3334
sudo ./program.sh
3435
```
3536
### IMX8 / H7 Interface Block Diagram
36-
Every communication is initated by the IMX8 who serves as SPI controller. This happens either by the user issueing a `write` call on any of the interfaces or by the H7 requesting the start of a communication by setting `IRQ` to `1`. A detailed description of the used protocol can be found [here](doc/protocol.md).
37+
Every communication is initiated by the IMX8 who serves as SPI controller. This happens either by the user issuing a `write` call on any of the interfaces or by the H7 requesting the start of a communication by setting `IRQ` to `1`. A detailed description of the used protocol can be found [here](doc/protocol.md).
3738
<p align="center">
3839
<img src="doc/img/portenta-x8h7-interface-block-diagram.png" width="75%">
3940
</p>

include/ringbuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
/**
4242
* The type which is used to hold the size
43-
* and the indicies of the buffer.
43+
* and the indices of the buffer.
4444
* Must be able to fit \c RING_BUFFER_SIZE .
4545
*/
4646
typedef uint16_t ring_buffer_size_t;

scripts/program-h7.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo 15 > /sys/class/gpio/export # SWDCLK
55
echo 10 > /sys/class/gpio/export # NRST
66
echo 11 > /sys/class/gpio/export # BOOT0
77

8-
# Try at least three times to read firware version from sysfs
8+
# Try at least three times to read firmware version from sysfs
99
for i in 1 2 3
1010
do
1111
FIRMWARE_H7_ON_MCU=$(cat /sys/kernel/x8h7_firmware/version)

src/can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ void can_init(can_t *obj, CANName peripheral, CanNominalBitTimingResult const ca
322322
/* Message RAM offset is only supported in STM32H7 platforms of supported FDCAN platforms */
323323
obj->CanHandle.Init.MessageRAMOffset = 0;
324324

325-
/* The number of Standard and Extended ID filters are initialized to the maximum possile extent
325+
/* The number of Standard and Extended ID filters are initialized to the maximum possible extent
326326
* for STM32H7 platforms
327327
*/
328328
obj->CanHandle.Init.StdFiltersNbr = 128; // to be aligned with the handle parameter in can_filter

src/gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void gpio_handler(uint8_t opcode, uint8_t *pdata, uint16_t size) {
261261
dbg_printf("GPIO%d: IRQ_ACK %d\n", index, value);
262262
/* Re-enable the interrupt that was disabled within
263263
* handle_irq to prevent firing of another interrupt
264-
* until this one has been signalled to the application.
264+
* until this one has been signaled to the application.
265265
*/
266266
gpio_enable_irq(GPIO_pinmap[index].pin);
267267
break;
@@ -311,7 +311,7 @@ void gpio_handle_data()
311311
/* We have a total of 10 external interrupts. */
312312
for (uint8_t index = 0; index < 10; index++)
313313
{
314-
/* Check whether or not an external interrupt has occured. */
314+
/* Check whether or not an external interrupt has occurred. */
315315
if (copy_int_event_flags & (1 << index))
316316
{
317317
uint8_t irq_pin = IRQ_pinmap[index].pin;

src/system.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ void enqueue_packet(uint8_t peripheral, uint8_t opcode, uint16_t size, void* dat
265265
/* Copy subpacket.raw_data at after subpacket.header. */
266266
memcpy((uint8_t*)&(tx_pkt->data) + tx_pkt->header.size, data, size);
267267
tx_pkt->header.size += size;
268-
/* Calculate a simple checksum to ensure bit flips in the length field can be recognised. */
268+
/* Calculate a simple checksum to ensure bit flips in the length field can be recognized. */
269269
tx_pkt->header.checksum = tx_pkt->header.size ^ 0x5555;
270270

271271
dbg_printf("Enqueued packet for peripheral: %s Opcode: %X Size: %X\n data: ",
@@ -379,7 +379,7 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) {
379379
get_data_amount = false;
380380

381381
} else {
382-
// real end of operation, pause DMA, memcpy stuff around and reenable DMA
382+
// real end of operation, pause DMA, memcpy stuff around and re-enable DMA
383383
// HAL_SPI_DMAPause(&hspi1);
384384

385385
transferState = TRANSFER_COMPLETE;

src/uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int _write(int file, char *ptr, int len)
7272
__disable_irq();
7373
/* Enqueue data to write into ringbuffer. */
7474
ring_buffer_queue_arr(&uart_tx_ring_buffer, ptr, len);
75-
/* Reenable interrupts. */
75+
/* Re-enable interrupts. */
7676
__enable_irq();
7777
return len;
7878
}

0 commit comments

Comments
 (0)