Skip to content

Commit

Permalink
Spell check, link checking and CI (#44)
Browse files Browse the repository at this point in the history
* Spell check and add codespell
* Add link checking CI, and missing files
  • Loading branch information
Robert Muchsel authored Mar 22, 2023
1 parent 686448a commit 7f2128c
Show file tree
Hide file tree
Showing 146 changed files with 407 additions and 366 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Lint code

on:
push:
branches-ignore: [test]
pull_request:
branches-ignore: [test]

jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install codespell
run: pip install codespell tomli

- name: Run codespell
run: codespell

- name: Install markdown-lint-check
run: npm install -g markdown-link-check

- name: Run markdown-lint-check
run: find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check -a 0 -p -v -r
2 changes: 1 addition & 1 deletion .github/workflows/no_pull_requests_to_main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a basic workflow to thow an error if a pull request targets the main and historic branches
# This is a basic workflow to throw an error if a pull request targets the main and historic branches

name: No Pull Requests to Main and Historic Branches

Expand Down
2 changes: 1 addition & 1 deletion archive/maxrefdes178-ASL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Please refer to main MAXREFDES178 documentation for instructions how to build, and load firmware:

[Getting Started with the MAXREFDES178# Cube Camera](./../maxrefdes178_doc/README.md)
[Getting Started with the MAXREFDES178# Cube Camera](../../maxrefdes178_doc/README.md)

Please note that ASL demo does not support Android application.

Expand Down
6 changes: 3 additions & 3 deletions archive/maxrefdes178-ASL/maxrefdes178_max32666/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
# Copyright (C) 2016-2023 Maxim Integrated Products, Inc., All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -102,7 +102,7 @@ ifeq ($(MAKECMDGOALS),sla)
SRCS += sla_header.c
endif

# External libray source files
# External library source files
SRCS += bmi160.c

# Where to find source files for this test
Expand Down Expand Up @@ -188,7 +188,7 @@ export PERIPH_DRIVER_DIR
#CORDIO_DIR=Cordio
#include $(CORDIO_DIR)/platform/targets/maxim/build/cordio.mk

# Inlcude USB Library
# Include USB Library
#MAXUSB_DIR=$(LIBS_DIR)/MAXUSB
#include $(MAXUSB_DIR)/maxusb.mk

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -125,7 +125,7 @@ int i2c_master_reg_read_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len

/**
* @brief Initialize I2C peripheral
* @retval #E_NO_ERROR Intialization successful.
* @retval #E_NO_ERROR Initialization successful.
* @retval "Error Code" @ref MXC_Error_Codes "Error Code" if unsuccessful.
*/
int i2c_master_init(void);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -53,15 +53,15 @@
/**
* @brief Initialize MAX20303 PMIC. Before calling this function, I2C should
* be initialized via i2c_init() function.
* @retval #E_NO_ERROR Intialization successful.
* @retval #E_NO_ERROR Initialization successful.
* @retval "Error Code" @ref MXC_Error_Codes "Error Code" if unsuccessful.
*/
int pmic_init(void);

/**
* @brief Worker function for MAX20303 PMIC. Before calling this function, I2C should
* be initialized via i2c_init() function.
* @retval #E_NO_ERROR Intialization successful.
* @retval #E_NO_ERROR Initialization successful.
* @retval "Error Code" @ref MXC_Error_Codes "Error Code" if unsuccessful.
*/
int pmic_worker(void);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
* Copyright (C) 2017-2023 Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -218,7 +218,7 @@ SECTIONS {
{
. = ALIGN(4);
_bss = .;
*(.bss*) /*read-write zero initialized data: uninitialzed global variable*/
*(.bss*) /*read-write zero initialized data: uninitialized global variable*/
*(COMMON)
_ebss = ALIGN(., 4);
} > SRAM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -689,7 +689,7 @@ int ble_send_indication(uint16_t dataLen, uint8_t *data)
}
}

PR_ERROR("indication couldnt sent");
PR_ERROR("indication couldn't be sent");

return E_COMM_ERR;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -452,7 +452,7 @@ static int ble_command_execute_rx_command(void)
expander_select_debugger((debugger_select_e)ble_command_buffer.total_payload_buffer[0]);
break;
default:
PR_ERROR("Unknwon command");
PR_ERROR("Unknown command");
break;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -210,7 +210,7 @@ static int lcd_configure(void)
lcd_sendSmallData(0x01); // Default value

lcd_sendCommand(0xC3); // VRH set
lcd_sendSmallData(0x12); // +-4.45v (defalut +-4.1v for 0x0B)
lcd_sendSmallData(0x12); // +-4.45v (default +-4.1v for 0x0B)

lcd_sendCommand(0xC4); // VDV set
lcd_sendSmallData(0x20); // Default value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -806,7 +806,7 @@ static int refresh_screen(void)
if ((timestamps.screen_drew - timestamps.audio_result_received) < LCD_CLASSIFICATION_DURATION) {
if (device_settings.enable_lcd_probabilty) {
snprintf(lcd_string_buff, sizeof(lcd_string_buff) - 1, "%s (%d%%)",
device_status.classification_audio.result, (uint8_t) device_status.classification_audio.probabily);
device_status.classification_audio.result, (uint8_t) device_status.classification_audio.probability);
} else {
strncpy(lcd_string_buff, device_status.classification_audio.result, sizeof(lcd_string_buff) - 1);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -237,7 +237,7 @@ int qspi_master_video_rx_worker(qspi_packet_type_e *qspi_packet_type_rx)
spi_dma_wait(MAX32666_QSPI_DMA_CHANNEL, MAX32666_QSPI);
GPIO_SET(video_cs_pin);

PR_INFO("video %s %d %0.1f", device_status.classification_video.result, device_status.classification_video.classification, (double)device_status.classification_video.probabily);
PR_INFO("video %s %d %0.1f", device_status.classification_video.result, device_status.classification_video.classification, (double)device_status.classification_video.probability);

break;
case QSPI_PACKET_TYPE_VIDEO_STATISTICS_RES:
Expand Down Expand Up @@ -425,7 +425,7 @@ int qspi_master_audio_rx_worker(qspi_packet_type_e *qspi_packet_type_rx)
spi_dma_wait(MAX32666_QSPI_DMA_CHANNEL, MAX32666_QSPI);
GPIO_SET(audio_cs_pin);

PR_INFO("audio %s %d %0.1f", device_status.classification_audio.result, device_status.classification_audio.classification, (double)device_status.classification_audio.probabily);
PR_INFO("audio %s %d %0.1f", device_status.classification_audio.result, device_status.classification_audio.classification, (double)device_status.classification_audio.probability);

break;
case QSPI_PACKET_TYPE_AUDIO_STATISTICS_RES:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -239,7 +239,7 @@ static int sdcard_example(void)
}

PR_INFO("Renaming File...");
if((err = f_rename("0:HelloWorld.txt", "0:MaximSDHC/HelloMaxim.txt")) != FR_OK){ //cr: clearify 0:file notation
if((err = f_rename("0:HelloWorld.txt", "0:MaximSDHC/HelloMaxim.txt")) != FR_OK){ //cr: clarify 0:file notation
PR_ERROR("Error moving file: %s", FF_ERRORS[err]);
f_mount(NULL, "", 0);
return err;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved.
* Copyright (C) 2016-2023 Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -36,7 +36,7 @@ FLASH_SIZE = 0x00080000; /* 512kB Flash */

BOOTLOADER_SIZE = 0x8000; /* 32k for flash bootloader */
BOOTMEM_SIZE = 0x40; /* 64 bytes of memory for flash bootloader */
ROM_BL_PAGE_SIZE = 0x2000; /* Last page is used by ROM bootlaoder */
ROM_BL_PAGE_SIZE = 0x2000; /* Last page is used by ROM bootloader */
MAINAPP_SIZE = FLASH_SIZE - BOOTLOADER_SIZE - BOOTMEM_SIZE - ROM_BL_PAGE_SIZE;

BOOTLOADER_ORIGIN = FLASH_ORIGIN;
Expand Down Expand Up @@ -155,7 +155,7 @@ SECTIONS {
{
. = ALIGN(4);
_bss = .;
*(.bss*) /*read-write zero initialized data: uninitialzed global variable*/
*(.bss*) /*read-write zero initialized data: uninitialized global variable*/
*(COMMON)
_ebss = ALIGN(., 4);
} > SRAM
Expand All @@ -166,7 +166,7 @@ SECTIONS {
_shared = .;
*(.mailbox*)
. = ALIGN(4);
*(.shared*) /*read-write zero initialized data: uninitialzed global variable*/
*(.shared*) /*read-write zero initialized data: uninitialized global variable*/
_eshared = ALIGN(., 4);
} > SRAM
__shared_data = LOADADDR(.shared);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -636,7 +636,7 @@ int main(void)
}

memcpy(classification_result.result, keywords[out_class], sizeof(classification_result.result));
classification_result.probabily = probability;
classification_result.probability = probability;

qspi_slave_send_packet((uint8_t *) &classification_result, sizeof(classification_result),
QSPI_PACKET_TYPE_AUDIO_CLASSIFICATION_RES);
Expand Down Expand Up @@ -747,7 +747,7 @@ static uint8_t cnn_load_data(uint8_t* pIn)
uint32_t mem;
uint16_t index = 0;

/* data should already be formated correctly */
/* data should already be formatted correctly */
/* pIn is 16KB, each 1KB belongs to a memory group */
for (mem = 0x50400000; mem <= 0x50418000; mem += 0x8000) {
memcpy((uint8_t*)mem, &pIn[index], 1024);
Expand Down Expand Up @@ -777,7 +777,7 @@ static uint8_t AddTranspose(uint8_t *pIn, uint8_t *pOut, uint16_t inSize,
uint16_t outSize, uint16_t width) {
/* Data order in Ai85 memory (transpose is included):
input(series of 8 bit samples): (0,0) ... (0,127) (1,0) ... (1,127) ...... (127,0)...(127,127) 16384 samples
output (32bit word): 16K samples in a buffer. Later, each 1K goes to a seperate CNN memory group
output (32bit word): 16K samples in a buffer. Later, each 1K goes to a separate CNN memory group
0x0000:
(0,3)(0,2)(0,1)(0,0)
(0,67)(0,66)(0,65)(0,64)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved.
* Copyright (C) 2016-2023 Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -36,7 +36,7 @@ FLASH_SIZE = 0x00080000; /* 512kB Flash */

BOOTLOADER_SIZE = 0x8000; /* 32k for flash bootloader */
BOOTMEM_SIZE = 0x40; /* 64 bytes of memory for flash bootloader */
ROM_BL_PAGE_SIZE = 0x2000; /* Last page is used by ROM bootlaoder */
ROM_BL_PAGE_SIZE = 0x2000; /* Last page is used by ROM bootloader */
MAINAPP_SIZE = FLASH_SIZE - BOOTLOADER_SIZE - BOOTMEM_SIZE - ROM_BL_PAGE_SIZE;

BOOTLOADER_ORIGIN = FLASH_ORIGIN;
Expand Down Expand Up @@ -155,7 +155,7 @@ SECTIONS {
{
. = ALIGN(4);
_bss = .;
*(.bss*) /*read-write zero initialized data: uninitialzed global variable*/
*(.bss*) /*read-write zero initialized data: uninitialized global variable*/
*(COMMON)
_ebss = ALIGN(., 4);
} > SRAM
Expand All @@ -166,7 +166,7 @@ SECTIONS {
_shared = .;
*(.mailbox*)
. = ALIGN(4);
*(.shared*) /*read-write zero initialized data: uninitialzed global variable*/
*(.shared*) /*read-write zero initialized data: uninitialized global variable*/
_eshared = ALIGN(., 4);
} > SRAM
__shared_data = LOADADDR(.shared);
Expand Down
2 changes: 1 addition & 1 deletion maxrefdes178-AIPortrait/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Please refer to main MAXREFDES178 documentation for instructions how to build, and load firmware:

[Getting Started with the MAXREFDES178# Cube Camera](./../maxrefdes178_doc/README.md)
[Getting Started with the MAXREFDES178# Cube Camera](../maxrefdes178_doc/README.md)

NOTE: This demo does not support Android application.

Expand Down
6 changes: 3 additions & 3 deletions maxrefdes178-AIPortrait/maxrefdes178_max32666/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
# Copyright (C) 2016-2023 Maxim Integrated Products, Inc., All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -114,7 +114,7 @@ ifeq ($(MAKECMDGOALS),sla)
SRCS += sla_header.c
endif

# External libray source files
# External library source files
SRCS += bmi160.c

# Where to find source files for this test
Expand Down Expand Up @@ -200,7 +200,7 @@ export PERIPH_DRIVER_DIR
#CORDIO_DIR=Cordio
#include $(CORDIO_DIR)/platform/targets/maxim/build/cordio.mk

# Inlcude USB Library
# Include USB Library
#MAXUSB_DIR=$(LIBS_DIR)/MAXUSB
#include $(MAXUSB_DIR)/maxusb.mk

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2020-2021 Maxim Integrated Products, Inc., All rights Reserved.
* Copyright (C) 2020-2023 Maxim Integrated Products, Inc., All rights Reserved.
*
* This software is protected by copyright laws of the United States and
* of foreign countries. This material may also be protected by patent laws
Expand Down Expand Up @@ -125,7 +125,7 @@ int i2c_master_reg_read_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len

/**
* @brief Initialize I2C peripheral
* @retval #E_NO_ERROR Intialization successful.
* @retval #E_NO_ERROR Initialization successful.
* @retval "Error Code" @ref MXC_Error_Codes "Error Code" if unsuccessful.
*/
int i2c_master_init(void);
Expand Down
Loading

0 comments on commit 7f2128c

Please sign in to comment.