From d75647cebb7d0f640edde20ba3d34173cb8fcec9 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 5 Oct 2023 13:05:57 +0200 Subject: [PATCH] Fix spelling mistakes. --- README.md | 2 +- include/ringbuffer.h | 2 +- scripts/program-h7.sh | 2 +- src/can.c | 2 +- src/gpio.c | 4 ++-- src/system.c | 4 ++-- src/uart.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d560fa3..4bdab4d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ cd /usr/arduino/extra sudo ./program.sh ``` ### IMX8 / H7 Interface Block Diagram -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). +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).

diff --git a/include/ringbuffer.h b/include/ringbuffer.h index 83b6187..4ec2a87 100644 --- a/include/ringbuffer.h +++ b/include/ringbuffer.h @@ -40,7 +40,7 @@ /** * The type which is used to hold the size - * and the indicies of the buffer. + * and the indices of the buffer. * Must be able to fit \c RING_BUFFER_SIZE . */ typedef uint16_t ring_buffer_size_t; diff --git a/scripts/program-h7.sh b/scripts/program-h7.sh index 531791e..ed60614 100755 --- a/scripts/program-h7.sh +++ b/scripts/program-h7.sh @@ -5,7 +5,7 @@ echo 15 > /sys/class/gpio/export # SWDCLK echo 10 > /sys/class/gpio/export # NRST echo 11 > /sys/class/gpio/export # BOOT0 -# Try at least three times to read firware version from sysfs +# Try at least three times to read firmware version from sysfs for i in 1 2 3 do FIRMWARE_H7_ON_MCU=$(cat /sys/kernel/x8h7_firmware/version) diff --git a/src/can.c b/src/can.c index 4a2407e..64a6f12 100644 --- a/src/can.c +++ b/src/can.c @@ -322,7 +322,7 @@ void can_init(can_t *obj, CANName peripheral, CanNominalBitTimingResult const ca /* Message RAM offset is only supported in STM32H7 platforms of supported FDCAN platforms */ obj->CanHandle.Init.MessageRAMOffset = 0; - /* The number of Standard and Extended ID filters are initialized to the maximum possile extent + /* The number of Standard and Extended ID filters are initialized to the maximum possible extent * for STM32H7 platforms */ obj->CanHandle.Init.StdFiltersNbr = 128; // to be aligned with the handle parameter in can_filter diff --git a/src/gpio.c b/src/gpio.c index ddfce98..b25741d 100644 --- a/src/gpio.c +++ b/src/gpio.c @@ -261,7 +261,7 @@ void gpio_handler(uint8_t opcode, uint8_t *pdata, uint16_t size) { dbg_printf("GPIO%d: IRQ_ACK %d\n", index, value); /* Re-enable the interrupt that was disabled within * handle_irq to prevent firing of another interrupt - * until this one has been signalled to the application. + * until this one has been signaled to the application. */ gpio_enable_irq(GPIO_pinmap[index].pin); break; @@ -311,7 +311,7 @@ void gpio_handle_data() /* We have a total of 10 external interrupts. */ for (uint8_t index = 0; index < 10; index++) { - /* Check whether or not an external interrupt has occured. */ + /* Check whether or not an external interrupt has occurred. */ if (copy_int_event_flags & (1 << index)) { uint8_t irq_pin = IRQ_pinmap[index].pin; diff --git a/src/system.c b/src/system.c index 42492a8..31921e9 100644 --- a/src/system.c +++ b/src/system.c @@ -265,7 +265,7 @@ void enqueue_packet(uint8_t peripheral, uint8_t opcode, uint16_t size, void* dat /* Copy subpacket.raw_data at after subpacket.header. */ memcpy((uint8_t*)&(tx_pkt->data) + tx_pkt->header.size, data, size); tx_pkt->header.size += size; - /* Calculate a simple checksum to ensure bit flips in the length field can be recognised. */ + /* Calculate a simple checksum to ensure bit flips in the length field can be recognized. */ tx_pkt->header.checksum = tx_pkt->header.size ^ 0x5555; dbg_printf("Enqueued packet for peripheral: %s Opcode: %X Size: %X\n data: ", @@ -379,7 +379,7 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) { get_data_amount = false; } else { - // real end of operation, pause DMA, memcpy stuff around and reenable DMA + // real end of operation, pause DMA, memcpy stuff around and re-enable DMA // HAL_SPI_DMAPause(&hspi1); transferState = TRANSFER_COMPLETE; diff --git a/src/uart.c b/src/uart.c index 302b7c2..cc8f81c 100644 --- a/src/uart.c +++ b/src/uart.c @@ -72,7 +72,7 @@ int _write(int file, char *ptr, int len) __disable_irq(); /* Enqueue data to write into ringbuffer. */ ring_buffer_queue_arr(&uart_tx_ring_buffer, ptr, len); - /* Reenable interrupts. */ + /* Re-enable interrupts. */ __enable_irq(); return len; }