diff --git a/.codespell/exclude-file.txt b/.codespell/exclude-file.txt new file mode 100644 index 0000000000..9f49d9ae0c --- /dev/null +++ b/.codespell/exclude-file.txt @@ -0,0 +1,7 @@ +#define MICROPY_HW_BOARD_NAME "BLOK" +USB_PRODUCT = "BLOK" + uint32_t THI = (*(uint32_t *)FUSES_HOT_TEMP_VAL_INT_ADDR & FUSES_HOT_TEMP_VAL_INT_Msk) >> FUSES_HOT_TEMP_VAL_INT_Pos; + float TH = THI + convert_dec_to_frac(THD); +print(binascii.b2a_base64(b"fo")) + # again, neither will "there" or "wither", since they have "the" +i1Qb$TE"rl diff --git a/.codespell/ignore-words.txt b/.codespell/ignore-words.txt new file mode 100644 index 0000000000..f2a8dc2be5 --- /dev/null +++ b/.codespell/ignore-words.txt @@ -0,0 +1,22 @@ +ans +ure +clen +ser +endianess +pris +synopsys +reenable +dout +inout +wel +iput +hsi +astroid +busses +cyphertext +dum +deque +deques +extint +shs +pass-thru diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..d4ef112d7a --- /dev/null +++ b/.codespellrc @@ -0,0 +1,10 @@ +# See: https://github.com/codespell-project/codespell#using-a-config-file +[codespell] +# In the event of a false positive, add the problematic word, in all lowercase, to 'ignore-words.txt' (one word per line). +# Or copy & paste the whole problematic line to 'exclude-file.txt' +ignore-words = .codespell/ignore-words.txt +exclude-file = .codespell/exclude-file.txt +check-filenames = +check-hidden = +count = +skip = .cproject,.git,./lib,./locale,ACKNOWLEDGEMENTS diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1905b233cf..ab0279f7d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,16 @@ repos: exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/espressif/esp-idf-config/.*|ports/espressif/boards/.*/sdkconfig)' - id: trailing-whitespace exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/.*)' +- repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + args: [-w] + exclude: | + (?x)^( + locale/| + lib/ + ) - repo: local hooks: - id: translations diff --git a/devices/ble_hci/common-hal/_bleio/Adapter.c b/devices/ble_hci/common-hal/_bleio/Adapter.c index f558d66d40..843c143424 100644 --- a/devices/ble_hci/common-hal/_bleio/Adapter.c +++ b/devices/ble_hci/common-hal/_bleio/Adapter.c @@ -483,7 +483,7 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t if (self->scan_results != NULL) { if (!shared_module_bleio_scanresults_get_done(self->scan_results)) { - mp_raise_bleio_BluetoothError(translate("Scan already in progess. Stop with stop_scan.")); + mp_raise_bleio_BluetoothError(translate("Scan already in progress. Stop with stop_scan.")); } self->scan_results = NULL; } diff --git a/devices/ble_hci/common-hal/_bleio/Adapter.h b/devices/ble_hci/common-hal/_bleio/Adapter.h index 48d4f2e6a2..45a37ad67c 100644 --- a/devices/ble_hci/common-hal/_bleio/Adapter.h +++ b/devices/ble_hci/common-hal/_bleio/Adapter.h @@ -65,7 +65,7 @@ typedef struct _bleio_adapter_obj_t { uint16_t manufacturer; uint16_t lmp_subversion; - // Used to monitor advertising timeout for legacy avertising. + // Used to monitor advertising timeout for legacy advertising. uint64_t advertising_start_ticks; uint64_t advertising_timeout_msecs; // If zero, do not check. diff --git a/devices/ble_hci/common-hal/_bleio/Connection.c b/devices/ble_hci/common-hal/_bleio/Connection.c index 9531231506..e9e1254b43 100644 --- a/devices/ble_hci/common-hal/_bleio/Connection.c +++ b/devices/ble_hci/common-hal/_bleio/Connection.c @@ -515,7 +515,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern // (gattc_char->char_props.write ? CHAR_PROP_WRITE : 0) | // (gattc_char->char_props.write_wo_resp ? CHAR_PROP_WRITE_NO_RESPONSE : 0); -// // Call common_hal_bleio_characteristic_construct() to initalize some fields and set up evt handler. +// // Call common_hal_bleio_characteristic_construct() to initialize some fields and set up evt handler. // common_hal_bleio_characteristic_construct( // characteristic, m_char_discovery_service, gattc_char->handle_value, uuid, // props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN, diff --git a/devices/ble_hci/common-hal/_bleio/att.c b/devices/ble_hci/common-hal/_bleio/att.c index f649967ca9..9dfe9eb26c 100644 --- a/devices/ble_hci/common-hal/_bleio/att.c +++ b/devices/ble_hci/common-hal/_bleio/att.c @@ -96,7 +96,7 @@ STATIC uint8_t bleio_properties_to_ble_spec_properties(uint8_t bleio_properties) return ble_spec_properties; } -// FIX not currently used; reenable when used. +// FIX not currently used; re-enable when used. #if 0 STATIC uint8_t ble_spec_properties_to_bleio_properties(uint8_t ble_spec_properties) { uint8_t bleio_properties = 0; @@ -964,7 +964,7 @@ static void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t d // Keep track of the first one to make sure. size_t sizeof_first_service_uuid = 0; - // Size of a single bt_att_group_data chunk. Start with the intial size, and + // Size of a single bt_att_group_data chunk. Start with the initial size, and // add the uuid size in the loop below. size_t data_length = sizeof(struct bt_att_group_data); diff --git a/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h b/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h index af8695da98..0f03894caa 100644 --- a/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h +++ b/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h @@ -150,7 +150,7 @@ struct bt_att_read_mult_req { uint16_t handles[]; } __packed; -/* Read Multiple Respose */ +/* Read Multiple Response */ #define BT_ATT_OP_READ_MULT_RSP 0x0f struct bt_att_read_mult_rsp { uint8_t _dummy[0]; @@ -243,7 +243,7 @@ struct bt_att_read_mult_vl_req { uint16_t handles[]; } __packed; -/* Read Multiple Respose */ +/* Read Multiple Response */ #define BT_ATT_OP_READ_MULT_VL_RSP 0x21 struct bt_att_read_mult_vl_rsp { uint16_t len; diff --git a/examples/natmod/features1/features1.c b/examples/natmod/features1/features1.c index f865f1887c..a5e82252a1 100644 --- a/examples/natmod/features1/features1.c +++ b/examples/natmod/features1/features1.c @@ -88,7 +88,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a // This must be first, it sets up the globals dict and other things MP_DYNRUNTIME_INIT_ENTRY - // Messages can be printed as usualy + // Messages can be printed as usually mp_printf(&mp_plat_print, "initialising module self=%p\n", self); // Make the functions available in the module's namespace diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0c7f823b5a..55ab977e97 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -180,10 +180,6 @@ msgstr "" msgid "%q must be >= %d" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -msgid "%q must be array of type 'H'" -msgstr "" - #: shared-bindings/analogbufio/BufferedIn.c msgid "%q must be a bytearray or array of type 'H' or 'B'" msgstr "" @@ -192,6 +188,10 @@ msgstr "" msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" msgstr "" +#: ports/espressif/common-hal/analogbufio/BufferedIn.c +msgid "%q must be array of type 'H'" +msgstr "" + #: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c #: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or %q, not %q" @@ -1221,7 +1221,8 @@ msgstr "" msgid "Interrupt error." msgstr "" -#: py/argcheck.c shared-bindings/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c +#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/displayio/EPaperDisplay.c msgid "Invalid %q" msgstr "" @@ -1519,10 +1520,6 @@ msgstr "" msgid "No in or out in program" msgstr "" -#: shared-bindings/aesio/aes.c -msgid "No key was specified" -msgstr "" - #: shared-bindings/time/__init__.c msgid "No long integer support" msgstr "" @@ -1935,7 +1932,7 @@ msgstr "" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Scan already in progess. Stop with stop_scan." +msgid "Scan already in progress. Stop with stop_scan." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2248,6 +2245,11 @@ msgstr "" msgid "Unknown BLE error: %d" msgstr "" +#: ports/raspberrypi/common-hal/wifi/__init__.c +#, c-format +msgid "Unknown error code %d" +msgstr "" + #: shared-bindings/wifi/Radio.c #, c-format msgid "Unknown failure %d" @@ -2283,11 +2285,6 @@ msgstr "" msgid "Unknown system firmware error: %d" msgstr "" -#: ports/raspberrypi/common-hal/wifi/__init__.c -#, c-format -msgid "Unkown error code %d" -msgstr "" - #: shared-bindings/adafruit_pixelbuf/PixelBuf.c #: shared-module/_pixelmap/PixelMap.c #, c-format @@ -2740,7 +2737,7 @@ msgstr "" msgid "can't set attribute" msgstr "" -#: py/runtime.c +#: py/runtime.c shared-bindings/supervisor/Runtime.c msgid "can't set attribute '%q'" msgstr "" @@ -3040,8 +3037,8 @@ msgid "extra positional arguments given" msgstr "" #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c -#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c -#: shared-module/gifio/GifWriter.c +#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/gifio/OnDiskGif.c +#: shared-bindings/synthio/__init__.c shared-module/gifio/GifWriter.c msgid "file must be a file opened in byte mode" msgstr "" @@ -4114,10 +4111,6 @@ msgstr "" msgid "tobytes can be invoked for dense arrays only" msgstr "" -#: shared-module/struct/__init__.c -msgid "too many arguments provided with the given format" -msgstr "" - #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" diff --git a/ports/atmel-samd/asf4_conf/samd21/hpl_tc_config.h b/ports/atmel-samd/asf4_conf/samd21/hpl_tc_config.h index d651ca33a8..706c7f4b67 100644 --- a/ports/atmel-samd/asf4_conf/samd21/hpl_tc_config.h +++ b/ports/atmel-samd/asf4_conf/samd21/hpl_tc_config.h @@ -49,7 +49,7 @@ #define CONF_TC3_WAVE_DUTY_VAL 0x1f4 #endif -/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ +/* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ #if CONF_TC3_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #define CONF_TC3_CC0 \ ((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 1000000 / (1 << CONF_TC3_PRESCALER) - 1)) diff --git a/ports/atmel-samd/asf4_conf/samd51/hpl_tc_config.h b/ports/atmel-samd/asf4_conf/samd51/hpl_tc_config.h index 3bc688295b..dc08b6eb23 100644 --- a/ports/atmel-samd/asf4_conf/samd51/hpl_tc_config.h +++ b/ports/atmel-samd/asf4_conf/samd51/hpl_tc_config.h @@ -42,7 +42,7 @@ #define CONF_TC0_WAVE_DUTY_VAL 0x1f4 #endif -/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ +/* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ #if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #define CONF_TC0_CC0 \ ((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1)) diff --git a/ports/atmel-samd/asf4_conf/same51/hpl_tc_config.h b/ports/atmel-samd/asf4_conf/same51/hpl_tc_config.h index 3bc688295b..dc08b6eb23 100644 --- a/ports/atmel-samd/asf4_conf/same51/hpl_tc_config.h +++ b/ports/atmel-samd/asf4_conf/same51/hpl_tc_config.h @@ -42,7 +42,7 @@ #define CONF_TC0_WAVE_DUTY_VAL 0x1f4 #endif -/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ +/* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ #if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #define CONF_TC0_CC0 \ ((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1)) diff --git a/ports/atmel-samd/asf4_conf/same54/hpl_tc_config.h b/ports/atmel-samd/asf4_conf/same54/hpl_tc_config.h index 3bc688295b..dc08b6eb23 100644 --- a/ports/atmel-samd/asf4_conf/same54/hpl_tc_config.h +++ b/ports/atmel-samd/asf4_conf/same54/hpl_tc_config.h @@ -42,7 +42,7 @@ #define CONF_TC0_WAVE_DUTY_VAL 0x1f4 #endif -/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ +/* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ #if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #define CONF_TC0_CC0 \ ((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1)) diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index 701dc4a8ec..aeea62d2a2 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -51,7 +51,7 @@ uint8_t display_init_sequence[] = { 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x2a, 0, // _INVOFF 0x36, 1, 0x18, // _MADCTL bottom to top refresh - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // fix on VTL 0x3a, 1, 0x05, // COLMOD - 16bit color 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma diff --git a/ports/atmel-samd/boards/pybadge/board.c b/ports/atmel-samd/boards/pybadge/board.c index a1cb3a0714..11db1ba0a8 100644 --- a/ports/atmel-samd/boards/pybadge/board.c +++ b/ports/atmel-samd/boards/pybadge/board.c @@ -50,7 +50,7 @@ uint8_t display_init_sequence[] = { 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x2a, 0, // _INVOFF 0x36, 1, 0b10100000, // _MADCTL for rotation 0 - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // fix on VTL 0x3a, 1, 0x05, // COLMOD - 16bit color 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma diff --git a/ports/atmel-samd/boards/pygamer/board.c b/ports/atmel-samd/boards/pygamer/board.c index 8ff34f24c5..141365a4a1 100644 --- a/ports/atmel-samd/boards/pygamer/board.c +++ b/ports/atmel-samd/boards/pygamer/board.c @@ -52,7 +52,7 @@ uint8_t display_init_sequence[] = { 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x2a, 0, // _INVOFF 0x36, 1, 0b10100000, // _MADCTL for rotation 0 - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // fix on VTL 0x3a, 1, 0x05, // COLMOD - 16bit color 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma diff --git a/ports/atmel-samd/boards/ugame10/board.c b/ports/atmel-samd/boards/ugame10/board.c index 90cf9dff20..9953f27d02 100644 --- a/ports/atmel-samd/boards/ugame10/board.c +++ b/ports/atmel-samd/boards/ugame10/board.c @@ -52,7 +52,7 @@ uint8_t display_init_sequence[] = { 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x2a, 0, // _INVOFF 0x36, 1, 0xa8, // _MADCTL bottom to top refresh - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // fix on VTL 0x3a, 1, 0x05, // COLMOD - 16bit color 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma diff --git a/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c b/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c index 2ead87428b..4c1d05feb2 100644 --- a/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c +++ b/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c @@ -36,7 +36,7 @@ STATIC volatile bool woke_up = false; STATIC mp_float_t wakeup_time; void common_hal_alarm_time_timealarm_construct(alarm_time_timealarm_obj_t *self, mp_float_t monotonic_time) { - // TODO: when issueing light/seep sleep, throw a ValueError if the + // TODO: when issuing light/seep sleep, throw a ValueError if the // time exceeds the maximum value. For light sleep, max = // 2**32 / 16384 = 3 days. For deep sleep, max = 2**32 / 32 // = 1550 days. diff --git a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c index 22200c5d1c..6d1a3f7c0e 100644 --- a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +++ b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c @@ -482,7 +482,7 @@ uint32_t common_hal_frequencyio_frequencyin_get_item(frequencyio_frequencyin_obj float time_each_event = self->factor / self->frequency; // get the time for each event during actual period float capture_diff = self->factor - self->capture_period; // get the difference of actual and base periods // we only need to adjust if the capture_diff can contain 1 or more events - // if so, we add how many events could have occured during the diff time + // if so, we add how many events could have occurred during the diff time if (time_each_event > capture_diff) { frequency_adjustment = capture_diff / time_each_event; } diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 887748c7a0..73686e1445 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -189,7 +189,7 @@ // - firmware // - internal CIRCUITPY flash filesystem (optional) // - internal config, used to store crystalless clock calibration info (optional) -// - microntroller.nvm (optional) +// - microcontroller.nvm (optional) // Define these regions starting up from the bottom of flash: diff --git a/ports/atmel-samd/sd_mmc/sd_mmc.c b/ports/atmel-samd/sd_mmc/sd_mmc.c index de5a3cfe17..b558922d1f 100644 --- a/ports/atmel-samd/sd_mmc/sd_mmc.c +++ b/ports/atmel-samd/sd_mmc/sd_mmc.c @@ -1073,7 +1073,7 @@ static void sd_mmc_deselect_slot(void) { * \note * This function runs the initialization procedure and the identification * process, then it sets the SD/MMC card in transfer state. - * At last, it will automaticly enable maximum bus width and transfer speed. + * At last, it will automatically enable maximum bus width and transfer speed. * * \return true if success, otherwise false */ @@ -1205,7 +1205,7 @@ static bool sd_mmc_mci_card_init(void) { * \note * This function runs the initialization procedure and the identification * process, then it sets the SD/MMC card in transfer state. - * At last, it will automaticly enable maximum bus width and transfer speed. + * At last, it will automatically enable maximum bus width and transfer speed. * * \return true if success, otherwise false */ @@ -1270,7 +1270,7 @@ static bool sd_mmc_mci_install_mmc(void) { uint8_t retry = 10; while (retry--) { /* Retry is a WORKAROUND for no compliance card (Atmel Internal ref. MMC19): - * These cards seem not ready immediatly + * These cards seem not ready immediately * after the end of busy of mmc_cmd6_set_high_speed()*/ /* Set default block size */ @@ -1427,7 +1427,7 @@ sd_mmc_err_t sd_mmc_wait_end_of_read_blocks(bool abort) { return SD_MMC_OK; } - /* All blocks are transfered then stop read operation */ + /* All blocks are transferred then stop read operation */ if (sd_mmc_nb_block_to_tranfer == 1) { /* Single block transfer, then nothing to do */ sd_mmc_deselect_slot(); @@ -1506,7 +1506,7 @@ sd_mmc_err_t sd_mmc_wait_end_of_write_blocks(bool abort) { return SD_MMC_OK; } - /* All blocks are transfered then stop write operation */ + /* All blocks are transferred then stop write operation */ if (sd_mmc_nb_block_to_tranfer == 1) { /* Single block transfer, then nothing to do */ sd_mmc_deselect_slot(); diff --git a/ports/atmel-samd/sd_mmc/sd_mmc.h b/ports/atmel-samd/sd_mmc/sd_mmc.h index e51bf17e80..667520317c 100644 --- a/ports/atmel-samd/sd_mmc/sd_mmc.h +++ b/ports/atmel-samd/sd_mmc/sd_mmc.h @@ -67,7 +67,7 @@ typedef uint8_t sd_mmc_err_t; /**< Type of return error code */ #define SD_MMC_INIT_ONGOING 1 /**< Card not initialized */ #define SD_MMC_ERR_NO_CARD 2 /**< No SD/MMC card inserted */ #define SD_MMC_ERR_UNUSABLE 3 /**< Unusable card */ -#define SD_MMC_ERR_SLOT 4 /**< Slot unknow */ +#define SD_MMC_ERR_SLOT 4 /**< Slot unknown */ #define SD_MMC_ERR_COMM 5 /**< General communication error */ #define SD_MMC_ERR_PARAM 6 /**< Illeage input parameter */ #define SD_MMC_ERR_WP 7 /**< Card write protected */ @@ -166,7 +166,7 @@ uint32_t sd_mmc_get_capacity(uint8_t slot); * * \param[in] slot Card slot * - * \return true, if write portected + * \return true, if write protected */ bool sd_mmc_is_write_protected(uint8_t slot); diff --git a/ports/atmel-samd/sd_mmc/sd_mmc_protocol.h b/ports/atmel-samd/sd_mmc/sd_mmc_protocol.h index 9b4d8e8e74..c205415559 100644 --- a/ports/atmel-samd/sd_mmc/sd_mmc_protocol.h +++ b/ports/atmel-samd/sd_mmc/sd_mmc_protocol.h @@ -73,8 +73,8 @@ extern "C" { * Responses types: * * R1, R3, R4 & R5 use a 48 bits response protected by a 7bit CRC checksum - * - R1 receiv data not specified - * - R3 receiv OCR + * - R1 receive data not specified + * - R3 receive OCR * - R4, R5 RCA management (MMC only) * - R6, R7 RCA management (SD only) * @@ -115,14 +115,14 @@ typedef uint32_t sdmmc_cmd_def_t; #define SDMMC_RESP_CRC (1lu << 12) // ! Card may send busy #define SDMMC_RESP_BUSY (1lu << 13) -// Open drain for a braodcast command (bc) +// Open drain for a broadcast command (bc) // or to enter in inactive state (MCI only) #define SDMMC_CMD_OPENDRAIN (1lu << 14) // ! To signal a data write operation #define SDMMC_CMD_WRITE (1lu << 15) -// ! To signal a SDIO tranfer in multi byte mode +// ! To signal a SDIO transfer in multi byte mode #define SDMMC_CMD_SDIO_BYTE (1lu << 16) -// ! To signal a SDIO tranfer in block mode +// ! To signal a SDIO transfer in block mode #define SDMMC_CMD_SDIO_BLOCK (1lu << 17) // ! To signal a data transfer in stream mode #define SDMMC_CMD_STREAM (1lu << 18) @@ -132,7 +132,7 @@ typedef uint32_t sdmmc_cmd_def_t; #define SDMMC_CMD_MULTI_BLOCK (1lu << 20) // ! @} -// ! \name Set of flags to define a reponse type +// ! \name Set of flags to define a response type // ! @{ #define SDMMC_CMD_NO_RESP (0) #define SDMMC_CMD_R1 (SDMMC_RESP_PRESENT | SDMMC_RESP_CRC) @@ -324,7 +324,7 @@ typedef uint32_t sdmmc_cmd_def_t; #define SD_MCI_ACMD41_SD_SEND_OP_COND (41 | SDMMC_CMD_R3 | SDMMC_CMD_OPENDRAIN) /** * ACMD41(R1): Send host capacity support information (HCS) and activates the - * card's initilization process + * card's initialization process */ #define SD_SPI_ACMD41_SD_SEND_OP_COND (41 | SDMMC_CMD_R1) /** @@ -440,7 +440,7 @@ typedef uint32_t sdmmc_cmd_def_t; #define SDIO_R5_ERROR (1lu << 11) /**< General error */ #define SDIO_R5_FUNC_NUM (1lu << 9) /**< Invalid function number */ #define SDIO_R5_OUT_OF_RANGE (1lu << 8) /**< Argument out of range */ -#define SDIO_R5_STATUS_ERR (SDIO_R5_ERROR | SDIO_R5_FUNC_NUM | SDIO_R5_OUT_OF_RANGE) // !< Errro status bits mask +#define SDIO_R5_STATUS_ERR (SDIO_R5_ERROR | SDIO_R5_FUNC_NUM | SDIO_R5_OUT_OF_RANGE) // !< Error status bits mask // ! @} // ! \name SDIO state (in R6) diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 45b999f1a1..8cba5c61e0 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -307,7 +307,7 @@ safe_mode_t port_init(void) { // because it was hard enough to figure out, and maybe there's // a mistake that could make it work in the future. #if 0 - // Designate QSPI memory mapped region as not cachable. + // Designate QSPI memory mapped region as not cacheable. // Turn off MPU in case it is on. MPU->CTRL = 0; @@ -320,7 +320,7 @@ safe_mode_t port_init(void) { 0b011 << MPU_RASR_AP_Pos | // full read/write access for privileged and user mode 0b000 << MPU_RASR_TEX_Pos | // caching not allowed, strongly ordered 1 << MPU_RASR_S_Pos | // sharable - 0 << MPU_RASR_C_Pos | // not cachable + 0 << MPU_RASR_C_Pos | // not cacheable 0 << MPU_RASR_B_Pos | // not bufferable 0b10111 << MPU_RASR_SIZE_Pos | // 16MB region size 1 << MPU_RASR_ENABLE_Pos // enable this region diff --git a/ports/espressif/README.rst b/ports/espressif/README.rst index 949f3533ae..49f372359b 100644 --- a/ports/espressif/README.rst +++ b/ports/espressif/README.rst @@ -55,7 +55,7 @@ Connect these pins using a `USB adapter ` **UART Connection:** -A `USB to UART convertor `_ can be used for connecting to ESP32-C3 to get access to the serial console and REPL and for flashing CircuitPython. +A `USB to UART converter `_ can be used for connecting to ESP32-C3 to get access to the serial console and REPL and for flashing CircuitPython. The following connections need to be made in this case: @@ -92,7 +92,7 @@ Connect these pins using a `USB adapter ` **UART Connection:** -A `USB to UART convertor `_ can be used for connecting to ESP32-S2 to get access to the serial console and REPL and for flashing CircuitPython. +A `USB to UART converter `_ can be used for connecting to ESP32-S2 to get access to the serial console and REPL and for flashing CircuitPython. The following connections need to be made in this case: @@ -129,7 +129,7 @@ Connect these pins using a `USB adapter ` **UART Connection:** -A `USB to UART convertor `_ can be used for connecting to ESP32-S3 to get access to the serial console and REPL and for flashing CircuitPython. +A `USB to UART converter `_ can be used for connecting to ESP32-S3 to get access to the serial console and REPL and for flashing CircuitPython. The following connections need to be made in this case: diff --git a/ports/espressif/bindings/espcamera/Camera.c b/ports/espressif/bindings/espcamera/Camera.c index 824bc7d3dc..5fb9576e58 100644 --- a/ports/espressif/bindings/espcamera/Camera.c +++ b/ports/espressif/bindings/espcamera/Camera.c @@ -63,7 +63,7 @@ //| """ //| Configure and initialize a camera with the given properties //| -//| This driver requires that the ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the camera frambuffer(s). Generally, boards with built-in cameras will have a default setting that is large enough. If the constructor raises a MemoryError or an IDFError, this probably indicates the setting is too small and should be increased. +//| This driver requires that the ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the camera framebuffer(s). Generally, boards with built-in cameras will have a default setting that is large enough. If the constructor raises a MemoryError or an IDFError, this probably indicates the setting is too small and should be increased. //| //| //| .. important:: @@ -89,7 +89,7 @@ //| :param reset_pin: The reset input to the camera module //| :param pixel_format: The pixel format of the captured image //| :param frame_size: The size of captured image -//| :param jpeg_quality: For `PixelFormat.JPEG`, the quality. Higher numbers increase quality. If the quality is too high, the JPEG data will be larger than the availalble buffer size and the image will be unusable or truncated. The exact range of appropriate values depends on the sensor and must be determined empirically. +//| :param jpeg_quality: For `PixelFormat.JPEG`, the quality. Higher numbers increase quality. If the quality is too high, the JPEG data will be larger than the available buffer size and the image will be unusable or truncated. The exact range of appropriate values depends on the sensor and must be determined empirically. //| :param framebuffer_count: The number of framebuffers (1 for single-buffered and 2 for double-buffered) //| :param grab_mode: When to grab a new frame //| """ diff --git a/ports/espressif/bindings/espnow/Peer.c b/ports/espressif/bindings/espnow/Peer.c index 7b6cc5f668..ca756409a6 100644 --- a/ports/espressif/bindings/espnow/Peer.c +++ b/ports/espressif/bindings/espnow/Peer.c @@ -32,7 +32,7 @@ #include "common-hal/espnow/__init__.h" // TODO: check peer already exist -// TODO: check peer dosen't exist +// TODO: check peer doesn't exist //| class Peer: //| """A data class to store parameters specific to a peer.""" diff --git a/ports/espressif/boards/lolin_s2_mini/pins.c b/ports/espressif/boards/lolin_s2_mini/pins.c index a4b18c4e9b..ee81e00d9e 100644 --- a/ports/espressif/boards/lolin_s2_mini/pins.c +++ b/ports/espressif/boards/lolin_s2_mini/pins.c @@ -4,7 +4,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // S2 Mini Board bottom, right, top-bottom - // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC + // GPIO0-GPIO14: broken out as a block on ESP32-S2FN4R2 SoC // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, // RTC_GPIO0,GPIO0 @@ -57,7 +57,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC // skip GPIO26-GPIO32: SPI Flash & RAM, not broken out on S2 Mini (internal to ESP32-S2FN4R2 SoC?) - // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG + // GPIO33-GPIO40: broken out as a block on ESP32-S2FN4R2 SoC, last 2 half of JTAG { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Wemos MP { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO33) },// D1 mini pin D2 GPIO4 diff --git a/ports/espressif/boards/m5stack_stick_c/board.c b/ports/espressif/boards/m5stack_stick_c/board.c index bbc0447056..ae29c9fa76 100644 --- a/ports/espressif/boards/m5stack_stick_c/board.c +++ b/ports/espressif/boards/m5stack_stick_c/board.c @@ -193,7 +193,7 @@ static bool pmic_init(void) { } // Reg: 12h - // Enable EXTEN, DCDC1, LDO2 and LDO3 + // Enable CTRL_EXTEN, DCDC1, LDO2 and LDO3 write_buf[0] = AXP192_DCDC13_LDO23_CTRL; write_buf[1] = AXP192_DCDC13_LDO23_CTRL_EXTEN | AXP192_DCDC13_LDO23_CTRL_LDO3 | diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c index 070e3418da..359263df81 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c @@ -51,7 +51,7 @@ uint8_t display_init_sequence[] = { 0xC5, 0x01, 0x0E, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x20, 0x00, // _INVOFF 0x36, 0x01, 0x18, // _MADCTL bottom to top refresh - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // fix on VTL 0x3A, 0x01, 0x05, // COLMOD - 16bit color 0xE0, 0x10, 0x02, 0x1C, 0x07, 0x12, 0x37, 0x32, 0x29, 0x2D, 0x29, 0x25, 0x2B, 0x39, 0x00, 0x01, 0x03, 0x10, // _GMCTRP1 Gamma diff --git a/ports/espressif/common-hal/_bleio/Adapter.c b/ports/espressif/common-hal/_bleio/Adapter.c index 3239c501cc..01adae3adb 100644 --- a/ports/espressif/common-hal/_bleio/Adapter.c +++ b/ports/espressif/common-hal/_bleio/Adapter.c @@ -221,7 +221,7 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) { if (self->scan_results != NULL) { if (!shared_module_bleio_scanresults_get_done(self->scan_results)) { - mp_raise_bleio_BluetoothError(translate("Scan already in progess. Stop with stop_scan.")); + mp_raise_bleio_BluetoothError(translate("Scan already in progress. Stop with stop_scan.")); } self->scan_results = NULL; } diff --git a/ports/espressif/common-hal/_bleio/Connection.c b/ports/espressif/common-hal/_bleio/Connection.c index 75def8ad76..5e3e02d8e5 100644 --- a/ports/espressif/common-hal/_bleio/Connection.c +++ b/ports/espressif/common-hal/_bleio/Connection.c @@ -248,7 +248,7 @@ STATIC int _discovered_characteristic_cb(uint16_t conn_handle, ((chr->properties & BLE_GATT_CHR_PROP_WRITE) != 0 ? CHAR_PROP_WRITE : 0) | ((chr->properties & BLE_GATT_CHR_PROP_WRITE_NO_RSP) != 0 ? CHAR_PROP_WRITE_NO_RESPONSE : 0); - // Call common_hal_bleio_characteristic_construct() to initalize some fields and set up evt handler. + // Call common_hal_bleio_characteristic_construct() to initialize some fields and set up evt handler. common_hal_bleio_characteristic_construct( characteristic, service, chr->val_handle, uuid, props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN, diff --git a/ports/espressif/common-hal/alarm/touch/TouchAlarm.c b/ports/espressif/common-hal/alarm/touch/TouchAlarm.c index 232614ce32..b58234c9a8 100644 --- a/ports/espressif/common-hal/alarm/touch/TouchAlarm.c +++ b/ports/espressif/common-hal/alarm/touch/TouchAlarm.c @@ -119,7 +119,7 @@ void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alar for (uint8_t i = 1; i <= 14; i++) { if ((touch_channel_mask & 1 << i) != 0) { touch_pad_t touch_channel = (touch_pad_t)i; - // intialize touchpad + // initialize touchpad peripherals_touch_init(touch_channel); // wait for touch data to reset @@ -166,7 +166,7 @@ void alarm_touch_touchalarm_prepare_for_deep_sleep(void) { peripherals_touch_never_reset(false); peripherals_touch_reset(); - // intialize touchpad + // initialize touchpad peripherals_touch_init(touch_channel); #if !defined(CONFIG_IDF_TARGET_ESP32) diff --git a/ports/espressif/common-hal/pulseio/PulseIn.c b/ports/espressif/common-hal/pulseio/PulseIn.c index bb6ef7f975..42db2f18bd 100644 --- a/ports/espressif/common-hal/pulseio/PulseIn.c +++ b/ports/espressif/common-hal/pulseio/PulseIn.c @@ -123,7 +123,7 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, const mcu rmt_config_t config = RMT_DEFAULT_CONFIG_RX(pin->number, channel); config.rx_config.filter_en = true; config.rx_config.idle_threshold = 30000; // 30*3=90ms idle required to register a sequence - config.clk_div = 240; // All measurements are divided by 3 to accomodate 65ms pulses + config.clk_div = 240; // All measurements are divided by 3 to accommodate 65ms pulses rmt_config(&config); rmt_driver_install(channel, 1000, 0); // TODO: pick a more specific buffer size? diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index 2cb1e6254b..519885a032 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -197,7 +197,7 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { if (!taken || self->variable_frequency) { ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num); reserved_timer_freq[self->tim_handle.timer_num] = 0; - // if timer isn't varfreq this will be off aleady + // if timer isn't varfreq this will be off already varfreq_timers[self->tim_handle.timer_num] = false; never_reset_tim[self->tim_handle.timer_num] = false; } diff --git a/ports/espressif/common-hal/rotaryio/IncrementalEncoder.c b/ports/espressif/common-hal/rotaryio/IncrementalEncoder.c index 07b97cf9a3..088f4a15dc 100644 --- a/ports/espressif/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/espressif/common-hal/rotaryio/IncrementalEncoder.c @@ -69,7 +69,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode .unit = unit, }; - // Reinitalize same unit, CHANNEL_1 with different parameters. + // Reinitialize same unit, CHANNEL_1 with different parameters. peripherals_pcnt_reinit(&pcnt_config_channel_1); self->pin_a = pin_a->number; diff --git a/ports/espressif/i2s_lcd_driver.h b/ports/espressif/i2s_lcd_driver.h index 0002d6b564..27c4e66b06 100644 --- a/ports/espressif/i2s_lcd_driver.h +++ b/ports/espressif/i2s_lcd_driver.h @@ -44,7 +44,7 @@ typedef struct { } i2s_lcd_config_t; /** - * @brief Initilize i2s lcd driver. + * @brief Initialize i2s lcd driver. * * @param config configuration of i2s * diff --git a/ports/litex/boards/fomu/fomu-spi.ld b/ports/litex/boards/fomu/fomu-spi.ld index e7db25b0c5..33ba3db686 100644 --- a/ports/litex/boards/fomu/fomu-spi.ld +++ b/ports/litex/boards/fomu/fomu-spi.ld @@ -93,7 +93,7 @@ SECTIONS . = ALIGN(4); _etext = .; /* define a global symbol at end of code */ - _sidata = _etext; /* This is used by the startup in order to initialize the .data secion */ + _sidata = _etext; /* This is used by the startup in order to initialize the .data section */ } >FLASH_FIRMWARE /* Uninitialized data section */ diff --git a/ports/litex/common-hal/neopixel_write/__init__.c b/ports/litex/common-hal/neopixel_write/__init__.c index e7e5600fb1..b26bbac695 100644 --- a/ports/litex/common-hal/neopixel_write/__init__.c +++ b/ports/litex/common-hal/neopixel_write/__init__.c @@ -72,7 +72,7 @@ static void ledda_init(void) { // Set clock register to 12 MHz / 64 kHz - 1 ledda_write((12000000 / 64000) - 1, LEDDBR); - // Ensure LED "breathe" effect is diabled + // Ensure LED "breathe" effect is disabled ledda_write(0, LEDDBCRR); ledda_write(0, LEDDBCFR); diff --git a/ports/litex/crt0-vexriscv.S b/ports/litex/crt0-vexriscv.S index 0419acf851..0517711865 100644 --- a/ports/litex/crt0-vexriscv.S +++ b/ports/litex/crt0-vexriscv.S @@ -6,7 +6,7 @@ _start: j crt_init - # This sentinal ensures that this program is loaded + # This sentinel ensures that this program is loaded # to RAM when loaded using dfu-util. #.word 0x17ab0f23 #.word 0x10001000 diff --git a/ports/mimxrt10xx/common-hal/neopixel_write/__init__.c b/ports/mimxrt10xx/common-hal/neopixel_write/__init__.c index 933d8aa444..a26c34ce32 100644 --- a/ports/mimxrt10xx/common-hal/neopixel_write/__init__.c +++ b/ports/mimxrt10xx/common-hal/neopixel_write/__init__.c @@ -64,7 +64,7 @@ void PLACE_IN_ITCM(common_hal_neopixel_write)(const digitalio_digitalinout_obj_t const uint32_t pin = digitalinout->pin->number; __disable_irq(); - // Use DWT in debug core. Useable when interrupts disabled, as opposed to Systick->VAL + // Use DWT in debug core. Usable when interrupts disabled, as opposed to Systick->VAL DWT->CYCCNT = 0; for (;;) { diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 2267a582a4..412ff86cde 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -241,7 +241,7 @@ FLASHER ?= ifeq ($(FLASHER),) -# Also update to bootloader settting to validate application and skip checksum ( app valid = 0x0001, crc = 0x0000 ) +# Also update to bootloader setting to validate application and skip checksum ( app valid = 0x0001, crc = 0x0000 ) flash: $(BUILD)/firmware.hex nrfjprog --program $< --sectorerase -f $(MCU_VARIANT) nrfjprog --erasepage $(BOOT_SETTING_ADDR) -f $(MCU_VARIANT) diff --git a/ports/nrf/bluetooth/s140_nrf52_6.1.0/s140_nrf52_6.1.0_API/include/ble_l2cap.h b/ports/nrf/bluetooth/s140_nrf52_6.1.0/s140_nrf52_6.1.0_API/include/ble_l2cap.h index d04bec3fbf..e0f005d9b0 100644 --- a/ports/nrf/bluetooth/s140_nrf52_6.1.0/s140_nrf52_6.1.0_API/include/ble_l2cap.h +++ b/ports/nrf/bluetooth/s140_nrf52_6.1.0/s140_nrf52_6.1.0_API/include/ble_l2cap.h @@ -286,7 +286,7 @@ typedef struct /**@brief L2CAP event structure. */ typedef struct { - uint16_t conn_handle; /**< Connection Handle on which the event occured. */ + uint16_t conn_handle; /**< Connection Handle on which the event occurred. */ uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or @ref BLE_L2CAP_CID_INVALID if not present. */ union diff --git a/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_l2cap.h b/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_l2cap.h index 933f398b57..a624338ceb 100644 --- a/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_l2cap.h +++ b/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_l2cap.h @@ -287,7 +287,7 @@ typedef struct /**@brief L2CAP event structure. */ typedef struct { - uint16_t conn_handle; /**< Connection Handle on which the event occured. */ + uint16_t conn_handle; /**< Connection Handle on which the event occurred. */ uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or @ref BLE_L2CAP_CID_INVALID if not present. */ union diff --git a/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_sdm.h b/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_sdm.h index 24001fb12a..3def7d6783 100644 --- a/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_sdm.h +++ b/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_sdm.h @@ -275,8 +275,8 @@ typedef struct * If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset(). * * @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device. - * Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripherial may - * continously transmit packets. + * Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripheral may + * continuously transmit packets. * * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback. * diff --git a/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_svc.h b/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_svc.h index 293001eccf..629739ed75 100644 --- a/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_svc.h +++ b/ports/nrf/bluetooth/s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_svc.h @@ -48,7 +48,7 @@ extern "C" { /** @brief Supervisor call declaration. * * A call to a function marked with @ref SVCALL, will trigger a Supervisor Call (SVC) Exception. - * The SVCs with SVC numbers 0x00-0x0F are forwared to the application. All other SVCs are handled by the SoftDevice. + * The SVCs with SVC numbers 0x00-0x0F are forwarded to the application. All other SVCs are handled by the SoftDevice. * * @param[in] number The SVC number to be used. * @param[in] return_type The return type of the SVC function. diff --git a/ports/nrf/boards/feather_nrf52840_express/README.md b/ports/nrf/boards/feather_nrf52840_express/README.md index 8d515010f9..88a78a20fd 100644 --- a/ports/nrf/boards/feather_nrf52840_express/README.md +++ b/ports/nrf/boards/feather_nrf52840_express/README.md @@ -104,7 +104,7 @@ Parsing hex file. Erasing user available code and UICR flash areas. Applying system reset. Checking that the area to write is not protected. -Programing device. +Programming device. Applying system reset. Run. ``` diff --git a/ports/nrf/boards/hiibot_bluefi/pins.c b/ports/nrf/boards/hiibot_bluefi/pins.c index ba1910dc9d..7e0e0a94f4 100644 --- a/ports/nrf/boards/hiibot_bluefi/pins.c +++ b/ports/nrf/boards/hiibot_bluefi/pins.c @@ -117,7 +117,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_13) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_13) }, - // P28~P33/D28~D33 connecte into QSPI FlashROM (W25Q16JV_IQ) + // P28~P33/D28~D33 connected into QSPI FlashROM (W25Q16JV_IQ) { MP_ROM_QSTR(MP_QSTR_P34), MP_ROM_PTR(&pin_P0_22) }, { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_P0_22) }, diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md b/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md index 5c41fdb7cf..7040507ba6 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md @@ -8,11 +8,11 @@ We've also routed two I2C buses, 2 SPI buses, eleven GPIO, dedicated ## CircuitPython Pin Defs -CircuitPython pin definitions, while simialr to other boards represent a slight departure from just the typical `A` and `D` pin definitions. The majority of general pins are labled as `G` (or alternatively, `BUS`,) as the MicroMod system they build on uses those names to specify pins that may not be specficially analog or digital. +CircuitPython pin definitions, while similar to other boards represent a slight departure from just the typical `A` and `D` pin definitions. The majority of general pins are labeled as `G` (or alternatively, `BUS`,) as the MicroMod system they build on uses those names to specify pins that may not be specficially analog or digital. This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map: -MicroMod Pin # | ATP Pin Label | Pin Definition | Additional Definitons | Pin/Port Reference | Notes +MicroMod Pin # | ATP Pin Label | Pin Definition | Additional Definitions | Pin/Port Reference | Notes :--------------|:--------------|:--------------|:-----------------------|:-------------------|:------ 8 | G11 | | | (Not Connected) | 10 | D0 | D0 | | P0_27 | diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index 1c3c829c5b..828ff8806d 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -190,7 +190,7 @@ STATIC uint32_t ble_stack_enable(void) { return err_code; } - // Increase the GATT Server attribute size to accomodate both the CircuitPython built-in service + // Increase the GATT Server attribute size to accommodate both the CircuitPython built-in service // and anything the user does. memset(&ble_conf, 0, sizeof(ble_conf)); // Each increment to the BLE_GATTS_ATTR_TAB_SIZE_DEFAULT multiplier costs 1408 bytes. @@ -529,7 +529,7 @@ STATIC bool scan_on_ble_evt(ble_evt_t *ble_evt, void *scan_results_in) { mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t *prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) { if (self->scan_results != NULL) { if (!shared_module_bleio_scanresults_get_done(self->scan_results)) { - mp_raise_bleio_BluetoothError(translate("Scan already in progess. Stop with stop_scan.")); + mp_raise_bleio_BluetoothError(translate("Scan already in progress. Stop with stop_scan.")); } self->scan_results = NULL; } diff --git a/ports/nrf/common-hal/_bleio/Characteristic.c b/ports/nrf/common-hal/_bleio/Characteristic.c index df86654c70..e911e5a1e3 100644 --- a/ports/nrf/common-hal/_bleio/Characteristic.c +++ b/ports/nrf/common-hal/_bleio/Characteristic.c @@ -283,7 +283,7 @@ void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self, } // Write with response will return NRF_ERROR_BUSY if the response has not been received. - // Write without reponse will return NRF_ERROR_RESOURCES if too many writes are pending. + // Write without response will return NRF_ERROR_RESOURCES if too many writes are pending. if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) { // We could wait for an event indicating the write is complete, but just retrying is easier. RUN_BACKGROUND_TASKS; diff --git a/ports/nrf/common-hal/_bleio/Connection.c b/ports/nrf/common-hal/_bleio/Connection.c index 0d8d8c32f0..69e6945d21 100644 --- a/ports/nrf/common-hal/_bleio/Connection.c +++ b/ports/nrf/common-hal/_bleio/Connection.c @@ -528,7 +528,7 @@ STATIC void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio (gattc_char->char_props.write ? CHAR_PROP_WRITE : 0) | (gattc_char->char_props.write_wo_resp ? CHAR_PROP_WRITE_NO_RESPONSE : 0); - // Call common_hal_bleio_characteristic_construct() to initalize some fields and set up evt handler. + // Call common_hal_bleio_characteristic_construct() to initialize some fields and set up evt handler. common_hal_bleio_characteristic_construct( characteristic, m_char_discovery_service, gattc_char->handle_value, uuid, props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN, diff --git a/ports/nrf/common-hal/_bleio/__init__.c b/ports/nrf/common-hal/_bleio/__init__.c index 718b28c7fe..75bfb60342 100644 --- a/ports/nrf/common-hal/_bleio/__init__.c +++ b/ports/nrf/common-hal/_bleio/__init__.c @@ -249,7 +249,7 @@ void common_hal_bleio_gattc_write(uint16_t handle, uint16_t conn_handle, mp_buff } // Write with response will return NRF_ERROR_BUSY if the response has not been received. - // Write without reponse will return NRF_ERROR_RESOURCES if too many writes are pending. + // Write without response will return NRF_ERROR_RESOURCES if too many writes are pending. if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) { // We could wait for an event indicating the write is complete, but just retrying is easier. MICROPY_VM_HOOK_LOOP; diff --git a/ports/nrf/common-hal/microcontroller/__init__.c b/ports/nrf/common-hal/microcontroller/__init__.c index cd4114dcfb..7824175605 100644 --- a/ports/nrf/common-hal/microcontroller/__init__.c +++ b/ports/nrf/common-hal/microcontroller/__init__.c @@ -55,7 +55,7 @@ void common_hal_mcu_disable_interrupts() { // Unlike __disable_irq(), this should only be called the first time // "is_nested_critical_region" is sd's equivalent of our nesting count // so a nested call would store 0 in the global and make the later - // exit call not actually reenable interrupts + // exit call not actually re-enable interrupts // // This only disables interrupts of priority 2 through 7; levels 0, 1, // and 4, are exclusive to softdevice and should never be used, so diff --git a/ports/nrf/common-hal/pwmio/PWMOut.c b/ports/nrf/common-hal/pwmio/PWMOut.c index f73e3d3952..6171f5eb76 100644 --- a/ports/nrf/common-hal/pwmio/PWMOut.c +++ b/ports/nrf/common-hal/pwmio/PWMOut.c @@ -94,7 +94,7 @@ STATIC void reset_single_pwmout(uint8_t i) { for (int ch = 0; ch < CHANNELS_PER_PWM; ch++) { pwm_seq[i][ch] = (1 << 15); // polarity = 0 - pwm->PSEL.OUT[ch] = 0xFFFFFFFF; // disconnnect from I/O + pwm->PSEL.OUT[ch] = 0xFFFFFFFF; // disconnect from I/O } } diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 99effcea2f..4726d51c55 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -65,7 +65,7 @@ // This also includes mpconfigboard.h. #include "py/circuitpy_mpconfig.h" -// Definitions that might be overriden by mpconfigboard.h +// Definitions that might be overridden by mpconfigboard.h #ifndef CIRCUITPY_INTERNAL_NVM_SIZE #define CIRCUITPY_INTERNAL_NVM_SIZE (8 * 1024) diff --git a/ports/nrf/supervisor/qspi_flash.c b/ports/nrf/supervisor/qspi_flash.c index df80671e64..2ae166d3ad 100644 --- a/ports/nrf/supervisor/qspi_flash.c +++ b/ports/nrf/supervisor/qspi_flash.c @@ -59,7 +59,7 @@ static int sck_delay_saved = 0; void qspi_disable(void) { // If VBUS is detected, no need to disable QSPI if (NRF_QSPI->ENABLE && !(NRF_POWER->USBREGSTATUS & POWER_USBREGSTATUS_VBUSDETECT_Msk)) { - // Keep CS high when QSPI is diabled + // Keep CS high when QSPI is disabled nrf_gpio_cfg_output(MICROPY_QSPI_CS); nrf_gpio_pin_write(MICROPY_QSPI_CS, 1); diff --git a/ports/raspberrypi/bindings/cyw43/__init__.c b/ports/raspberrypi/bindings/cyw43/__init__.c index 778da1ab62..520d10263c 100644 --- a/ports/raspberrypi/bindings/cyw43/__init__.c +++ b/ports/raspberrypi/bindings/cyw43/__init__.c @@ -84,7 +84,7 @@ const mp_obj_type_t cyw43_pin_type = { //| The low 4 bits, ``m``, are the power management mode: //| * 0: disabled //| * 1: aggressive power saving which reduces wifi throughput -//| * 2: Power saving with high througput +//| * 2: Power saving with high throughput //| //| The next 8 bits, ``r``, specify "the maximum time to wait before going back to sleep" for power management mode 2. The units of ``r`` are 10ms. //| diff --git a/ports/raspberrypi/common-hal/ssl/SSLSocket.c b/ports/raspberrypi/common-hal/ssl/SSLSocket.c index 67508f16c8..06fe350cb6 100644 --- a/ports/raspberrypi/common-hal/ssl/SSLSocket.c +++ b/ports/raspberrypi/common-hal/ssl/SSLSocket.c @@ -257,7 +257,7 @@ mp_uint_t common_hal_ssl_sslsocket_recv_into(ssl_sslsocket_obj_t *self, uint8_t } else if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) { // If handshake is not finished, read attempt may end up in protocol // wanting to write next handshake message. The same may happen with - // renegotation. + // renegotiation. ret = MP_EWOULDBLOCK; } DEBUG("raising errno [error case] %d\n", ret); @@ -276,7 +276,7 @@ mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t *self, const uint8_t } else if (ret == MBEDTLS_ERR_SSL_WANT_READ) { // If handshake is not finished, write attempt may end up in protocol // wanting to read next handshake message. The same may happen with - // renegotation. + // renegotiation. ret = MP_EWOULDBLOCK; } DEBUG("raising errno [error case] %d\n", ret); diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index ae14d29ade..2ed19a96e7 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -176,7 +176,7 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_ common_hal_wifi_radio_stop_ap(self); - // Channel can only be changed after inital powerup and config of ap. + // Channel can only be changed after initial powerup and config of ap. // Defaults to 1 if not set or invalid (i.e. 13) cyw43_wifi_ap_set_channel(&cyw43_state, (const uint32_t)channel); diff --git a/ports/raspberrypi/common-hal/wifi/__init__.c b/ports/raspberrypi/common-hal/wifi/__init__.c index e5a646f88f..91a45e8d92 100644 --- a/ports/raspberrypi/common-hal/wifi/__init__.c +++ b/ports/raspberrypi/common-hal/wifi/__init__.c @@ -107,7 +107,7 @@ void raise_cyw_error(int err) { mp_errno = MP_ETIMEDOUT; break; default: - mp_raise_OSError_msg_varg(translate("Unkown error code %d"), err); + mp_raise_OSError_msg_varg(translate("Unknown error code %d"), err); } mp_raise_OSError(mp_errno); } diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index c5de2a439d..21dde6d239 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -21,11 +21,11 @@ CIRCUITPY_ROTARYIO ?= 1 CIRCUITPY_ROTARYIO_SOFTENCODER = 1 # Things that need to be implemented. -# Use PWM interally +# Use PWM internally CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CTARGET = 1 CIRCUITPY_NVM = 1 -# Use PIO interally +# Use PIO internally CIRCUITPY_PULSEIO ?= 1 CIRCUITPY_WATCHDOG ?= 1 diff --git a/ports/stm/boards/common_default.ld b/ports/stm/boards/common_default.ld index 0c7efd01d4..7c96a42bc5 100644 --- a/ports/stm/boards/common_default.ld +++ b/ports/stm/boards/common_default.ld @@ -24,7 +24,7 @@ SECTIONS . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ - /* This first flash block is 16K annd the isr vectors only take up + /* This first flash block is 16K and the isr vectors only take up about 400 bytes. Micropython pads this with files, but this didn't work with the size of Circuitpython's ff object. */ diff --git a/ports/stm/boards/common_nvm.ld b/ports/stm/boards/common_nvm.ld index 91e453bfd9..1d10db8a31 100644 --- a/ports/stm/boards/common_nvm.ld +++ b/ports/stm/boards/common_nvm.ld @@ -26,7 +26,7 @@ SECTIONS . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ - /* This first flash block is 16K annd the isr vectors only take up + /* This first flash block is 16K and the isr vectors only take up about 400 bytes. Micropython pads this with files, but this didn't work with the size of Circuitpython's ff object. */ diff --git a/ports/stm/boards/common_tcm.ld b/ports/stm/boards/common_tcm.ld index 9e677862d3..d7be64d667 100644 --- a/ports/stm/boards/common_tcm.ld +++ b/ports/stm/boards/common_tcm.ld @@ -26,7 +26,7 @@ SECTIONS . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ - /* This first flash block is 16K annd the isr vectors only take up + /* This first flash block is 16K and the isr vectors only take up about 400 bytes. Micropython pads this with files, but this didn't work with the size of Circuitpython's ff object. */ diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk index 6e4da86dd7..0ed5b161a1 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.mk +++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk @@ -14,7 +14,7 @@ LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F401xd_fs.ld # Disable ulab as we're nearly out of space on this board due to -# INTERNAL_FLASH_FILESYSTEM. It can probably be reenabled if we enable +# INTERNAL_FLASH_FILESYSTEM. It can probably be re-enabled if we enable # lto for this port, and if other stuff hasn't been added in the # meantime CIRCUITPY_AESIO = 0 diff --git a/ports/stm/boards/meowbit_v121/board.c b/ports/stm/boards/meowbit_v121/board.c index e4d362bbfa..0edf3d40e4 100644 --- a/ports/stm/boards/meowbit_v121/board.c +++ b/ports/stm/boards/meowbit_v121/board.c @@ -54,7 +54,7 @@ uint8_t display_init_sequence[] = { 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x20, 0, // _INVOFF //MISMATCh 0x2a vs 0x20 0x36, 1, 0x60, // _MADCTL bottom to top refresh - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // fix on VTL 0x3a, 1, 0x05, // COLMOD - 16bit color 0xe0, 0x10, 0x02, 0x1c, 0x07, 0x12, diff --git a/ports/stm/boards/swan_r5/tests/enable_3v3.py b/ports/stm/boards/swan_r5/tests/enable_3v3.py index ba955c4f58..c32bbc58b8 100644 --- a/ports/stm/boards/swan_r5/tests/enable_3v3.py +++ b/ports/stm/boards/swan_r5/tests/enable_3v3.py @@ -5,7 +5,7 @@ import digitalio import supervisor import time -# Scenario: Enable 3V3 pin defintiion +# Scenario: Enable 3V3 pin definition # Then the symbol "board.ENABLE_3V3" is defined assert board.ENABLE_3V3 is not None diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio.h b/ports/stm/common-hal/audiobusio/MEMS_Audio.h index 2f670c8505..77f11dc82f 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio.h +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio.h @@ -35,7 +35,7 @@ extern "C" { /** * @brief How many milliseconds of audio can fit in the audio buffer(s). - * Interrupts for recieved data fire at half this duration / twice the frequency. + * Interrupts for received data fire at half this duration / twice the frequency. */ #ifndef MEMS_AUDIO_MS_BUFFER #define MEMS_AUDIO_MS_BUFFER (1) diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h index ce2c397d47..31a8133b63 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h @@ -148,7 +148,7 @@ typedef struct MemsAudio_STM32L4SAIPDM_t { pdm_data_available_t pdm_data_available; /** - * @brief A cound of the number of PDM clients in use. + * @brief A count of the number of PDM clients in use. */ uint32_t SAI1_client; diff --git a/ports/stm/common-hal/neopixel_write/__init__.c b/ports/stm/common-hal/neopixel_write/__init__.c index 99529793fa..9eb30a4509 100644 --- a/ports/stm/common-hal/neopixel_write/__init__.c +++ b/ports/stm/common-hal/neopixel_write/__init__.c @@ -67,7 +67,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, uint32_t p_mask = pin_mask(digitalinout->pin->number); __disable_irq(); - // Enable DWT in debug core. Useable when interrupts disabled, as opposed to Systick->VAL + // Enable DWT in debug core. Usable when interrupts disabled, as opposed to Systick->VAL CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; DWT->CYCCNT = 0; diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index 0e4c6dbd48..b04bc2158c 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -456,7 +456,7 @@ STATIC mp_obj_t extra_coverage(void) { { mp_printf(&mp_plat_print, "# VM\n"); - // call mp_execute_bytecode with invalide bytecode (should raise NotImplementedError) + // call mp_execute_bytecode with invalid bytecode (should raise NotImplementedError) mp_obj_fun_bc_t fun_bc; fun_bc.bytecode = (const byte *)"\x01"; // just needed for n_state mp_code_state_t *code_state = m_new_obj_var(mp_code_state_t, mp_obj_t, 1); diff --git a/ports/unix/modos.c b/ports/unix/modos.c index a6365aa6a3..8373c07a5c 100644 --- a/ports/unix/modos.c +++ b/ports/unix/modos.c @@ -147,7 +147,7 @@ STATIC mp_obj_t mod_os_remove(mp_obj_t path_in) { const char *path = mp_obj_str_get_str(path_in); // Note that POSIX requires remove() to be able to delete a directory - // too (act as rmdir()). This is POSIX extenstion to ANSI C semantics + // too (act as rmdir()). This is POSIX extension to ANSI C semantics // of that function. But Python remove() follows ANSI C, and explicitly // required to raise exception on attempt to remove a directory. Thus, // call POSIX unlink() here. diff --git a/ports/unix/modtermios.c b/ports/unix/modtermios.c index 7a578becb9..4adef8a380 100644 --- a/ports/unix/modtermios.c +++ b/ports/unix/modtermios.c @@ -73,7 +73,7 @@ STATIC mp_obj_t mod_termios_tcsetattr(mp_obj_t fd_in, mp_obj_t when_in, mp_obj_t // We don't export TCSANOW and friends to save on code space. Then // common lazy sense says that passing 0 should be godo enough, and // it is e.g. for glibc. But for other libc's it's not, so set just - // treat 0 as defauling to TCSANOW. + // treat 0 as defaulting to TCSANOW. when = TCSANOW; } diff --git a/py/asmthumb.c b/py/asmthumb.c index 547e5bedc1..1b1923370b 100644 --- a/py/asmthumb.c +++ b/py/asmthumb.c @@ -281,7 +281,7 @@ bool asm_thumb_b_n_label(asm_thumb_t *as, uint label) { #define OP_BCC_N(cond, byte_offset) (0xd000 | ((cond) << 8) | (((byte_offset) >> 1) & 0x00ff)) -// all these bit arithmetics need coverage testing! +// all these bit arithmetic need coverage testing! #define OP_BCC_W_HI(cond, byte_offset) (0xf000 | ((cond) << 6) | (((byte_offset) >> 10) & 0x0400) | (((byte_offset) >> 14) & 0x003f)) #define OP_BCC_W_LO(byte_offset) (0x8000 | ((byte_offset) & 0x2000) | (((byte_offset) >> 1) & 0x0fff)) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 4de29880d9..5f140413bb 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -393,7 +393,7 @@ extern const struct _mp_obj_module_t nvm_module; // Native modules that are weak links can be accessed directly // by prepending their name with an underscore. This list should correspond to // MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS, assuming you want the native modules -// to be accessible when overriden. +// to be accessible when overridden. #define MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index d002ab4d43..b8e2178870 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -526,7 +526,7 @@ CFLAGS += -DUSB_NUM_ENDPOINT_PAIRS=$(USB_NUM_ENDPOINT_PAIRS) CIRCUITPY_USTACK ?= 0 CFLAGS += -DCIRCUITPY_USTACK=$(CIRCUITPY_USTACK) -# for decompressing utlities +# for decompressing utilities CIRCUITPY_ZLIB ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_ZLIB=$(CIRCUITPY_ZLIB) diff --git a/py/compile.c b/py/compile.c index 432aeca561..3668bee320 100644 --- a/py/compile.c +++ b/py/compile.c @@ -3477,7 +3477,7 @@ mp_raw_code_t *mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr source_f } } - // update maximim number of labels needed + // update maximum number of labels needed if (comp->next_label > max_num_labels) { max_num_labels = comp->next_label; } diff --git a/py/emitbc.c b/py/emitbc.c index 8f7b1d5b72..80d0bf489b 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -253,7 +253,7 @@ STATIC void emit_write_bytecode_byte_obj(emit_t *emit, int stack_adj, byte b, mp emit_write_bytecode_byte(emit, stack_adj, b); emit->bytecode_offset = (size_t)MP_ALIGN(emit->bytecode_offset, sizeof(mp_obj_t)); mp_obj_t *c = (mp_obj_t *)emit_get_cur_to_write_bytecode(emit, sizeof(mp_obj_t)); - // Verify thar c is already uint-aligned + // Verify that c is already uint-aligned assert(c == MP_ALIGN(c, sizeof(mp_obj_t))); *c = obj; #endif @@ -269,7 +269,7 @@ STATIC void emit_write_bytecode_byte_raw_code(emit_t *emit, int stack_adj, byte emit_write_bytecode_byte(emit, stack_adj, b); emit->bytecode_offset = (size_t)MP_ALIGN(emit->bytecode_offset, sizeof(void *)); void **c = (void **)emit_get_cur_to_write_bytecode(emit, sizeof(void *)); - // Verify thar c is already uint-aligned + // Verify that c is already uint-aligned assert(c == MP_ALIGN(c, sizeof(void *))); *c = rc; #endif diff --git a/py/emitnative.c b/py/emitnative.c index 5946fcd341..7d615d5816 100644 --- a/py/emitnative.c +++ b/py/emitnative.c @@ -944,7 +944,7 @@ STATIC void emit_access_stack(emit_t *emit, int pos, vtype_kind_t *vtype, int re } // does an efficient X=pop(); discard(); push(X) -// needs a (non-temp) register in case the poped element was stored in the stack +// needs a (non-temp) register in case the popped element was stored in the stack STATIC void emit_fold_stack_top(emit_t *emit, int reg_dest) { stack_info_t *si = &emit->stack_info[emit->stack_size - 2]; si[0] = si[1]; diff --git a/py/formatfloat.c b/py/formatfloat.c index d75cfc6658..4671f3348b 100644 --- a/py/formatfloat.c +++ b/py/formatfloat.c @@ -39,7 +39,7 @@ Routine for converting a arbitrary floating point number into a string. - The code in this funcion was inspired from Fred Bayer's pdouble.c. + The code in this function was inspired from Fred Bayer's pdouble.c. Since pdouble.c was released as Public Domain, I'm releasing this code as public domain as well. @@ -390,7 +390,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch --dec; --num_digits_left; if (digit_index <= 0) { - // Once we get below 1.0, we scale up f instead of calculting + // Once we get below 1.0, we scale up f instead of calculating // negative powers of 10 in u_base. This provides better // renditions of exact decimals like 1/16 etc. f *= FPCONST(10.0); diff --git a/py/makecompresseddata.py b/py/makecompresseddata.py index 9603de8713..1bce3e8e83 100644 --- a/py/makecompresseddata.py +++ b/py/makecompresseddata.py @@ -24,7 +24,7 @@ def check_non_ascii(msg): # Replace with . -# Trival scheme to demo/test. +# Trivial scheme to demo/test. def space_compression(error_strings): for line in error_strings: check_non_ascii(line) diff --git a/py/mkrules.mk b/py/mkrules.mk index ef0f66117d..09ed82ac5b 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -13,7 +13,7 @@ OBJ_EXTRA_ORDER_DEPS = # tree. # # So for example, py/map.c would have an object file name py/map.o -# The object files will go into the build directory and mantain the same +# The object files will go into the build directory and maintain the same # directory structure as the source tree. So the final dependency will look # like this: # @@ -142,7 +142,7 @@ endif ifneq ($(PROG),) # Build a standalone executable (unix does this) -# The executable should have an .exe extension for builds targetting 'pure' +# The executable should have an .exe extension for builds targeting 'pure' # Windows, i.e. msvc or mingw builds, but not when using msys or cygwin's gcc. COMPILER_TARGET := $(shell $(CC) -dumpmachine) ifneq (,$(findstring mingw,$(COMPILER_TARGET))) diff --git a/py/objexcept.c b/py/objexcept.c index 24fb564e23..e05c3ca8d7 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -176,7 +176,7 @@ mp_obj_t mp_obj_exception_make_new(const mp_obj_type_t *type, size_t n_args, siz mp_obj_tuple_t *o_tuple; if (n_args == 0) { - // No args, can use the empty tuple straightaway + // No args, can use the empty tuple straight away o_tuple = (mp_obj_tuple_t *)&mp_const_empty_tuple_obj; } else { // Try to allocate memory for the tuple containing the args diff --git a/py/objtype.c b/py/objtype.c index 76b9551be8..5b04c361e1 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -649,7 +649,7 @@ STATIC void mp_obj_instance_load_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des mp_obj_t member = dest[0]; if (member != MP_OBJ_NULL) { if (!(self->base.type->flags & MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS)) { - // Class doesn't have any special accessors to check so return straightaway + // Class doesn't have any special accessors to check so return straight away return; } diff --git a/py/runtime.c b/py/runtime.c index 91d9eb1c6d..804b955e07 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -414,7 +414,7 @@ mp_obj_t MICROPY_WRAP_MP_BINARY_OP(mp_binary_op)(mp_binary_op_t op, mp_obj_t lhs } else { // standard precision is enough for right-shift if (rhs_val >= (mp_int_t)(sizeof(lhs_val) * MP_BITS_PER_BYTE)) { - // Shifting to big amounts is underfined behavior + // Shifting to big amounts is undefined behavior // in C and is CPU-dependent; propagate sign bit. rhs_val = sizeof(lhs_val) * MP_BITS_PER_BYTE - 1; } diff --git a/py/scope.h b/py/scope.h index 8b05421072..b189260a37 100644 --- a/py/scope.h +++ b/py/scope.h @@ -49,7 +49,7 @@ typedef struct _id_info_t { uint8_t kind; uint8_t flags; // when it's an ID_INFO_KIND_LOCAL this is the unique number of the local - // whet it's an ID_INFO_KIND_CELL/FREE this is the unique number of the closed over variable + // when it's an ID_INFO_KIND_CELL/FREE this is the unique number of the closed over variable uint16_t local_num; qstr qst; } id_info_t; diff --git a/py/sequence.c b/py/sequence.c index 7befc85763..42a9a4a0ae 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -171,7 +171,7 @@ bool mp_seq_cmp_objs(mp_uint_t op, const mp_obj_t *items1, size_t len1, const mp continue; } - // Othewise, if they are not equal, we can have final decision based on them + // Otherwise, if they are not equal, we can have final decision based on them if (op == MP_BINARY_OP_EQUAL) { // In particular, if we are checking for equality, here're the answer return false; diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index 29c9b49d3f..94879e14d4 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -71,7 +71,7 @@ //| wake_alarm: Optional[circuitpython_typing.Alarm] //| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm that woke it from sleep. -//| If no alarm occured since the last hard reset or soft restart, value is ``None``. +//| If no alarm occurred since the last hard reset or soft restart, value is ``None``. //| """ //| diff --git a/shared-bindings/alarm/__init__.h b/shared-bindings/alarm/__init__.h index 82bfae4286..c47f482e74 100644 --- a/shared-bindings/alarm/__init__.h +++ b/shared-bindings/alarm/__init__.h @@ -33,7 +33,7 @@ #include "common-hal/digitalio/DigitalInOut.h" // Light sleep fully self-contained and does not exit user code. It will return -// the same alarm object that was orignally passed in, unlike deep sleep, which +// the same alarm object that was originally passed in, unlike deep sleep, which // must create an identical copy due to the VM reset extern mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj_t *alarms); diff --git a/shared-bindings/audiomp3/__init__.c b/shared-bindings/audiomp3/__init__.c index 948910c45e..9fe525dfe2 100644 --- a/shared-bindings/audiomp3/__init__.c +++ b/shared-bindings/audiomp3/__init__.c @@ -33,7 +33,7 @@ //| """Support for MP3-compressed audio files //| -//| For more infomration about working with MP3 files in CircuitPython, +//| For more information about working with MP3 files in CircuitPython, //| see `this CircuitPython Essentials Learn guide page //| `_. //| """ diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 1195e1811d..f965e504f2 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -530,14 +530,14 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li //| value: int, //| close: Optional[bool] = True, //| ) -> None: -//| """Draw a polygon conecting points on provided bitmap with provided value +//| """Draw a polygon connecting points on provided bitmap with provided value //| //| :param bitmap dest_bitmap: Destination bitmap that will be written into //| :param ReadableBuffer xs: x-pixel position of the polygon's vertices //| :param ReadableBuffer ys: y-pixel position of the polygon's vertices //| :param int value: Bitmap palette index that will be written into the //| line in the destination bitmap -//| :param bool close: (Optional) Wether to connect first and last point. (True) +//| :param bool close: (Optional) Whether to connect first and last point. (True) //| //| .. code-block:: Python //| @@ -630,7 +630,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_polygon_obj, 0, bitmaptools_obj_draw //| """Inserts pixels from ``data`` into the rectangle of width×height pixels with the upper left corner at ``(x,y)`` //| //| The values from ``data`` are taken modulo the number of color values -//| avalable in the destination bitmap. +//| available in the destination bitmap. //| //| If x1 or y1 are not specified, they are taken as 0. If x2 or y2 //| are not specified, or are given as -1, they are taken as the width @@ -722,7 +722,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit); //| :param typing.BinaryIO file: A file opened in binary mode //| :param int bits_per_pixel: Number of bits per pixel. Values 1, 2, 4, 8, 16, 24, and 32 are supported; //| :param int element_size: Number of bytes per element. Values of 1, 2, and 4 are supported, except that 24 ``bits_per_pixel`` requires 1 byte per element. -//| :param bool reverse_pixels_in_element: If set, the first pixel in a word is taken from the Most Signficant Bits; otherwise, it is taken from the Least Significant Bits. +//| :param bool reverse_pixels_in_element: If set, the first pixel in a word is taken from the Most Significant Bits; otherwise, it is taken from the Least Significant Bits. //| :param bool swap_bytes_in_element: If the ``element_size`` is not 1, then reverse the byte order of each element read. //| :param bool reverse_rows: Reverse the direction of the row loading (required for some bitmap images). //| """ @@ -782,7 +782,7 @@ STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_readinto_obj, 0, bitmaptools_readinto); //| class DitherAlgorithm: -//| """Identifies the algorith for dither to use""" +//| """Identifies the algorithm for dither to use""" //| //| Atkinson: "DitherAlgorithm" //| """The classic Atkinson dither, often associated with the Hypercard esthetic""" diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index 971ed2f676..99b99b37ea 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -43,7 +43,7 @@ //| Common container for board base pin names. These will vary from board to //| board so don't expect portability when using this module. //| -//| Another common use of this module is to use serial communciation buses with +//| Another common use of this module is to use serial communication buses with //| the default pins and settings. For more information about serial communcication //| in CircuitPython, see the :mod:`busio`. //| diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index 77d7036c2e..a10dc8efad 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -157,7 +157,7 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, si // Always initially allocate the UART object within the long-lived heap. // This is needed to avoid crashes with certain UART implementations which - // cannot accomodate being moved after creation. (See + // cannot accommodate being moved after creation. (See // https://github.com/adafruit/circuitpython/issues/1056) busio_uart_obj_t *self = m_new_ll_obj_with_finaliser(busio_uart_obj_t); self->base.type = &busio_uart_type; diff --git a/shared-bindings/countio/__init__.c b/shared-bindings/countio/__init__.c index 25e9c7d630..0d412cc17f 100644 --- a/shared-bindings/countio/__init__.c +++ b/shared-bindings/countio/__init__.c @@ -11,7 +11,7 @@ //| """Support for edge counting //| -//| The `countio` module contains logic to read and count edge transistions +//| The `countio` module contains logic to read and count edge transitions //| //| For more information on the applications of counting edges, see //| `this Learn Guide on sequential circuits diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index 3fcd1d082b..77dc8aecee 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -61,7 +61,7 @@ //| //| def release_displays() -> None: -//| """Releases any actively used displays so their busses and pins can be used again. This will also +//| """Releases any actively used displays so their buses and pins can be used again. This will also //| release the builtin display on boards that have one. You will need to reinitialize it yourself //| afterwards. This may take seconds to complete if an active EPaperDisplay is refreshing. //| diff --git a/shared-bindings/keypad/Event.c b/shared-bindings/keypad/Event.c index c8d24294f8..8264ebe612 100644 --- a/shared-bindings/keypad/Event.c +++ b/shared-bindings/keypad/Event.c @@ -64,7 +64,7 @@ STATIC mp_obj_t keypad_event_make_new(const mp_obj_type_t *type, size_t n_args, timestamp = supervisor_ticks_ms(); } - (void)mp_obj_get_int_truncated(timestamp); // ensure that timesamp is an integer + (void)mp_obj_get_int_truncated(timestamp); // ensure that timestamp is an integer common_hal_keypad_event_construct(self, key_number, args[ARG_pressed].u_bool, timestamp); return MP_OBJ_FROM_PTR(self); } diff --git a/shared-bindings/keypad/KeyMatrix.c b/shared-bindings/keypad/KeyMatrix.c index 49723dbb9e..1c623f4bed 100644 --- a/shared-bindings/keypad/KeyMatrix.c +++ b/shared-bindings/keypad/KeyMatrix.c @@ -56,7 +56,7 @@ //| An `EventQueue` is created when this object is created and is available in the `events` attribute. //| //| :param Sequence[microcontroller.Pin] row_pins: The pins attached to the rows. -//| :param Sequence[microcontroller.Pin] column_pins: The pins attached to the colums. +//| :param Sequence[microcontroller.Pin] column_pins: The pins attached to the columns. //| :param bool columns_to_anodes: Default ``True``. //| If the matrix uses diodes, the diode anodes are typically connected to the column pins, //| and the cathodes should be connected to the row pins. If your diodes are reversed, diff --git a/shared-bindings/microcontroller/ResetReason.c b/shared-bindings/microcontroller/ResetReason.c index 13a8f25e6d..6f8ac8f42b 100644 --- a/shared-bindings/microcontroller/ResetReason.c +++ b/shared-bindings/microcontroller/ResetReason.c @@ -39,31 +39,31 @@ MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, UNKNOWN, RESET_REASON_UNKNO MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, RESCUE_DEBUG, RESET_REASON_RESCUE_DEBUG); //| class ResetReason: -//| """The reason the microntroller was last reset""" +//| """The reason the microcontroller was last reset""" //| //| POWER_ON: object //| """The microcontroller was started from power off.""" //| //| BROWNOUT: object -//| """The microntroller was reset due to too low a voltage.""" +//| """The microcontroller was reset due to too low a voltage.""" //| //| SOFTWARE: object -//| """The microntroller was reset from software.""" +//| """The microcontroller was reset from software.""" //| //| DEEP_SLEEP_ALARM: object -//| """The microntroller was reset for deep sleep and restarted by an alarm.""" +//| """The microcontroller was reset for deep sleep and restarted by an alarm.""" //| //| RESET_PIN: object -//| """The microntroller was reset by a signal on its reset pin. The pin might be connected to a reset button.""" +//| """The microcontroller was reset by a signal on its reset pin. The pin might be connected to a reset button.""" //| //| WATCHDOG: object //| """The microcontroller was reset by its watchdog timer.""" //| //| UNKNOWN: object -//| """The microntroller restarted for an unknown reason.""" +//| """The microcontroller restarted for an unknown reason.""" //| //| RESCUE_DEBUG: object -//| """The microntroller was reset by the rescue debug port.""" +//| """The microcontroller was reset by the rescue debug port.""" //| MAKE_ENUM_MAP(mcu_reset_reason) { MAKE_ENUM_MAP_ENTRY(reset_reason, POWER_ON), diff --git a/shared-bindings/paralleldisplay/ParallelBus.c b/shared-bindings/paralleldisplay/ParallelBus.c index 42b4c788c7..ad9a1efdce 100644 --- a/shared-bindings/paralleldisplay/ParallelBus.c +++ b/shared-bindings/paralleldisplay/ParallelBus.c @@ -39,7 +39,7 @@ //| class ParallelBus: //| """Manage updating a display over 8-bit parallel bus in the background while Python code runs. This -//| protocol may be refered to as 8080-I Series Parallel Interface in datasheets. It doesn't handle +//| protocol may be referred to as 8080-I Series Parallel Interface in datasheets. It doesn't handle //| display initialization.""" //| //| def __init__( diff --git a/shared-bindings/rotaryio/IncrementalEncoder.c b/shared-bindings/rotaryio/IncrementalEncoder.c index fae55db317..09a48f01aa 100644 --- a/shared-bindings/rotaryio/IncrementalEncoder.c +++ b/shared-bindings/rotaryio/IncrementalEncoder.c @@ -42,7 +42,7 @@ //| ) -> None: //| """Create an IncrementalEncoder object associated with the given pins. It tracks the positional //| state of an incremental rotary encoder (also known as a quadrature encoder.) Position is -//| relative to the position when the object is contructed. +//| relative to the position when the object is constructed. //| //| :param ~microcontroller.Pin pin_a: First pin to read pulses from. //| :param ~microcontroller.Pin pin_b: Second pin to read pulses from. diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 8068bbe8b6..922c2f0872 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -781,7 +781,7 @@ void common_hal_bitmaptools_dither(displayio_bitmap_t *dest_bitmap, displayio_bi bitmaptools_dither_algorithm_info_t *info = algorithms[algorithm]; // rowdata holds 3 rows of data. Each one is larger than the input - // bitmap's width, beacuse `mx` extra pixels are allocated at the start and + // bitmap's width, because `mx` extra pixels are allocated at the start and // end of the row so that no conditionals are needed when storing the error data. int16_t rowdata[(width + 2 * info->mx) * 3]; int16_t *rows[3] = { diff --git a/shared/netutils/dhcpserver.c b/shared/netutils/dhcpserver.c index d396a2ba56..3f90a06e46 100644 --- a/shared/netutils/dhcpserver.c +++ b/shared/netutils/dhcpserver.c @@ -277,8 +277,8 @@ static void dhcp_server_process(void *arg, struct udp_pcb *upcb, struct pbuf *p, opt_write_n(&opt, DHCP_OPT_SERVER_ID, 4, &d->ip.addr); opt_write_n(&opt, DHCP_OPT_SUBNET_MASK, 4, &d->nm.addr); - opt_write_n(&opt, DHCP_OPT_ROUTER, 4, &d->ip.addr); // aka gateway; can have mulitple addresses - opt_write_u32(&opt, DHCP_OPT_DNS, DEFAULT_DNS); // can have mulitple addresses + opt_write_n(&opt, DHCP_OPT_ROUTER, 4, &d->ip.addr); // aka gateway; can have multiple addresses + opt_write_u32(&opt, DHCP_OPT_DNS, DEFAULT_DNS); // can have multiple addresses opt_write_u32(&opt, DHCP_OPT_IP_LEASE_TIME, DEFAULT_LEASE_TIME_S); *opt++ = DHCP_OPT_END; dhcp_socket_sendto(&d->udp, &dhcp_msg, opt - (uint8_t *)&dhcp_msg, 0xffffffff, PORT_DHCP_CLIENT); diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c index 87219d18f5..aeb92f59d3 100644 --- a/shared/runtime/pyexec.c +++ b/shared/runtime/pyexec.c @@ -643,7 +643,7 @@ friendly_repl_reset: // If the user gets to here and interrupts are disabled then // they'll never see the prompt, traceback etc. The USB REPL needs // interrupts to be enabled or no transfers occur. So we try to - // do the user a favor and reenable interrupts. + // do the user a favor and re-enable interrupts. if (query_irq() == IRQ_STATE_DISABLED) { enable_irq(IRQ_STATE_ENABLED); mp_hal_stdout_tx_str("MPY: enabling IRQs\r\n"); diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index 141ad7e5f8..f72518ac50 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -97,7 +97,7 @@ static bool write_flash(uint32_t address, const uint8_t *data, uint32_t data_len if (flash_device == NULL) { return false; } - // Don't bother writing if the data is all 1s. Thats equivalent to the flash + // Don't bother writing if the data is all 1s. That's equivalent to the flash // state after an erase. if (!flash_device->no_erase_cmd) { // Only do this if the device has an erase command diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index d3a31de71a..0ab97fc9a9 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -117,7 +117,7 @@ safe_mode_t wait_for_safe_mode_reset(void) { if (boot_in_safe_mode) { return SAFE_MODE_USER; } - // Restore the original state of the saved word if no reset occured during our wait period. + // Restore the original state of the saved word if no reset occurred during our wait period. port_set_saved_word(reset_state); return SAFE_MODE_NONE; } diff --git a/supervisor/shared/translate/compressed_string.h b/supervisor/shared/translate/compressed_string.h index e331a5866f..f524010db5 100644 --- a/supervisor/shared/translate/compressed_string.h +++ b/supervisor/shared/translate/compressed_string.h @@ -62,7 +62,7 @@ // // The "data" / "tail" construct is so that the struct's last member is a // "flexible array". However, the _only_ member is not permitted to be -// a flexible member, so we have to declare the first byte as a separte +// a flexible member, so we have to declare the first byte as a separate // member of the structure. // // For translations where length needs 8 bits, this saves about 1.5 diff --git a/tests/basics/annotate_var.py b/tests/basics/annotate_var.py index 3f767e4a73..a359b229b1 100644 --- a/tests/basics/annotate_var.py +++ b/tests/basics/annotate_var.py @@ -1,4 +1,4 @@ -# test PEP 526, varible annotations +# test PEP 526, variable annotations x: int print("x" in globals()) diff --git a/tests/basics/int_big1.py b/tests/basics/int_big1.py index 40d16c455b..f6e4b61d1d 100644 --- a/tests/basics/int_big1.py +++ b/tests/basics/int_big1.py @@ -1,4 +1,4 @@ -# to test arbitrariy precision integers +# to test arbitrary precision integers x = 1000000000000000000000000000000 xn = -1000000000000000000000000000000 diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py index ec29ea9080..2ac900bbc7 100644 --- a/tests/basics/struct1.py +++ b/tests/basics/struct1.py @@ -79,7 +79,7 @@ try: except: print("Unknown type") -# Initially repitition counters were supported only for strings, +# Initially repetition counters were supported only for strings, # but later were implemented for all. print(struct.unpack("<3B2h", b"foo\x12\x34\xff\xff")) print(struct.pack("<3B", 1, 2, 3)) diff --git a/tests/basics/with_return.py b/tests/basics/with_return.py index fd848f1331..af65a5b984 100644 --- a/tests/basics/with_return.py +++ b/tests/basics/with_return.py @@ -30,7 +30,7 @@ def f(): return (i, j) print(f()) -# multiple for loops within nested withs +# multiple for loops within nested with statements def f(): with CtxMgr(1): for i in [1, 2]: @@ -41,7 +41,7 @@ def f(): return (i, j, k, l) print(f()) -# multiple for loops that are optimised, and nested withs +# multiple for loops that are optimised, and nested with statements def f(): with CtxMgr(1): for i in range(1, 3): diff --git a/tests/cpydiff/core_fstring_repr.py b/tests/cpydiff/core_fstring_repr.py index fcadcbf1b9..df80abf795 100644 --- a/tests/cpydiff/core_fstring_repr.py +++ b/tests/cpydiff/core_fstring_repr.py @@ -2,7 +2,7 @@ categories: Core description: f-strings don't support the !r, !s, and !a conversions cause: MicroPython is optimised for code space. -workaround: Use repr(), str(), and ascii() explictly. +workaround: Use repr(), str(), and ascii() explicitly. """ diff --git a/tests/cpydiff/core_import_path.py b/tests/cpydiff/core_import_path.py index 04fc4bd5bb..959fd571f5 100644 --- a/tests/cpydiff/core_import_path.py +++ b/tests/cpydiff/core_import_path.py @@ -1,7 +1,7 @@ """ categories: Core,import description: __path__ attribute of a package has a different type (single string instead of list of strings) in MicroPython -cause: MicroPython does't support namespace packages split across filesystem. Beyond that, MicroPython's import system is highly optimized for minimal memory usage. +cause: MicroPython doesn't support namespace packages split across filesystem. Beyond that, MicroPython's import system is highly optimized for minimal memory usage. workaround: Details of import handling is inherently implementation dependent. Don't rely on such details in portable applications. """ import modules diff --git a/tests/cpydiff/core_import_split_ns_pkgs.py b/tests/cpydiff/core_import_split_ns_pkgs.py index 62bf337a22..5c92b63124 100644 --- a/tests/cpydiff/core_import_split_ns_pkgs.py +++ b/tests/cpydiff/core_import_split_ns_pkgs.py @@ -1,6 +1,6 @@ """ categories: Core,import -description: MicroPython does't support namespace packages split across filesystem. +description: MicroPython doesn't support namespace packages split across filesystem. cause: MicroPython's import system is highly optimized for simplicity, minimal memory usage, and minimal filesystem search overhead. workaround: Don't install modules belonging to the same namespace package in different directories. For MicroPython, it's recommended to have at most 3-component module search paths: for your current application, per-user (writable), system-wide (non-writable). """ diff --git a/tests/extmod/framebuf_palette.py b/tests/extmod/framebuf_palette.py index 84db834c15..f5b15fda73 100644 --- a/tests/extmod/framebuf_palette.py +++ b/tests/extmod/framebuf_palette.py @@ -30,6 +30,6 @@ fbd.blit(fbc, 0, 0, -1, palette) print(fbd.pixel(0, 0) == fg) print(fbd.pixel(7, 7) == fg) -print(fbd.pixel(8, 8) == 0) # Ouside blit +print(fbd.pixel(8, 8) == 0) # Outside blit print(fbd.pixel(0, 1) == bg) print(fbd.pixel(1, 0) == bg) diff --git a/tests/extmod/uctypes_sizeof_layout.py b/tests/extmod/uctypes_sizeof_layout.py index 2108e81502..c710ecde95 100644 --- a/tests/extmod/uctypes_sizeof_layout.py +++ b/tests/extmod/uctypes_sizeof_layout.py @@ -13,7 +13,7 @@ desc = { # uctypes.NATIVE is default print(uctypes.sizeof(desc) == uctypes.sizeof(desc, uctypes.NATIVE)) -# Here we assume that that we run on a platform with convential ABI +# Here we assume that that we run on a platform with conventional ABI # (which rounds up structure size based on max alignment). For platforms # where that doesn't hold, this tests should be just disabled in the runner. print(uctypes.sizeof(desc, uctypes.NATIVE) > uctypes.sizeof(desc, uctypes.LITTLE_ENDIAN)) diff --git a/tests/extmod/utimeq1.py b/tests/extmod/utimeq1.py index ddbc969afb..688e5b834f 100644 --- a/tests/extmod/utimeq1.py +++ b/tests/extmod/utimeq1.py @@ -125,7 +125,7 @@ assert edge_case(MODULO_HALF - 1, -100) == diff # We expect diff to be always positive, per the definition of heappop() which should return # the smallest value. -# This is the edge case where this invariant breaks, due to assymetry of two's-complement +# This is the edge case where this invariant breaks, due to asymmetry of two's-complement # range - there's one more negative integer than positive, so heappushing values like below # will then make ticks_diff() return the minimum negative value. We could make heappop # return them in a different order, but ticks_diff() result would be the same. Conclusion: diff --git a/tests/feature_check/README b/tests/feature_check/README index 3b7b6cba41..0f55e7ece4 100644 --- a/tests/feature_check/README +++ b/tests/feature_check/README @@ -1,4 +1,4 @@ This directory doesn't contain real tests, but code snippets to detect -various interpreter features, which can't be/inconvenient to detecte by +various interpreter features, which can't be/inconvenient to detected by other means. Scripts here are executed by run-tests.py at the beginning of testsuite to decide what other test groups to run/exclude. diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py index 1c3706ec33..ecd4f10391 100644 --- a/tests/misc/non_compliant.py +++ b/tests/misc/non_compliant.py @@ -39,7 +39,7 @@ try: except NotImplementedError: print("NotImplementedError") -# uPy raises TypeError, shold be ValueError +# uPy raises TypeError, should be ValueError try: "%c" % b"\x01\x02" except (TypeError, ValueError): diff --git a/tests/thread/thread_lock1.py b/tests/thread/thread_lock1.py index e7066402ca..f49f57ce83 100644 --- a/tests/thread/thread_lock1.py +++ b/tests/thread/thread_lock1.py @@ -32,7 +32,7 @@ print(lock.locked()) with lock: print(lock.locked()) -# test that lock is unlocked if an error is rasied +# test that lock is unlocked if an error is raised try: with lock: print(lock.locked()) diff --git a/tools/analyze_heap_dump.py b/tools/analyze_heap_dump.py index d9b3dda599..ede990929d 100755 --- a/tools/analyze_heap_dump.py +++ b/tools/analyze_heap_dump.py @@ -446,7 +446,7 @@ def do_all_the_things( current_allocation = 1 elif block_state == AT_TAIL and current_allocation > 0: # In gc_free the logging happens before the tail is freed. So checking - # current_allocation > 0 ensures we only extend an allocation thats started. + # current_allocation > 0 ensures we only extend an allocation that's started. current_allocation += 1 longest_free = max(longest_free, current_free) # if current_free > 0: diff --git a/tools/gendoc.py b/tools/gendoc.py index f3df853e49..e7eb011b7c 100644 --- a/tools/gendoc.py +++ b/tools/gendoc.py @@ -523,7 +523,7 @@ def main(): description="Generate documentation for pyboard API from C files." ) cmd_parser.add_argument( - "--outdir", metavar="", default="gendoc-out", help="ouput directory" + "--outdir", metavar="", default="gendoc-out", help="output directory" ) cmd_parser.add_argument("--format", default="html", help="output format: html or rst") cmd_parser.add_argument("files", nargs="+", help="input files") diff --git a/tools/makemanifest.py b/tools/makemanifest.py index 8cdc3eb774..b2856889b9 100644 --- a/tools/makemanifest.py +++ b/tools/makemanifest.py @@ -164,7 +164,7 @@ def system(cmd): def convert_path(path): - # Perform variable substituion. + # Perform variable substitution. for name, value in VARS.items(): path = path.replace("$({})".format(name), value) # Convert to absolute path (so that future operations don't rely on diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py index 6c41c4cd43..eb835961f6 100755 --- a/tools/preprocess_frozen_modules.py +++ b/tools/preprocess_frozen_modules.py @@ -21,10 +21,10 @@ def version_string(path=None, *, valid_semver=False): version = tag.strip().decode("utf-8", "strict") except subprocess.CalledProcessError: describe = subprocess.check_output("git describe --tags", shell=True, cwd=path) - tag, additional_commits, commitish = ( + tag, additional_commits, commit_ish = ( describe.strip().decode("utf-8", "strict").rsplit("-", maxsplit=2) ) - commitish = commitish[1:] + commit_ish = commit_ish[1:] if valid_semver: version_info = semver.parse_version_info(tag) if not version_info.prerelease: @@ -33,12 +33,12 @@ def version_string(path=None, *, valid_semver=False): + "-alpha.0.plus." + additional_commits + "+" - + commitish + + commit_ish ) else: - version = tag + ".plus." + additional_commits + "+" + commitish + version = tag + ".plus." + additional_commits + "+" + commit_ish else: - version = commitish + version = commit_ish return version diff --git a/tools/pydfu.py b/tools/pydfu.py index ce34b08a58..57a8708e5d 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -483,7 +483,7 @@ def get_memory_layout(device): def list_dfu_devices(*args, **kwargs): - """Prints a lits of devices detected in DFU mode.""" + """Prints a list of devices detected in DFU mode.""" devices = get_dfu_devices(*args, **kwargs) if not devices: raise SystemExit("No DFU capable devices found") diff --git a/tools/uncrustify.cfg b/tools/uncrustify.cfg index 88127112e8..a92530fd93 100644 --- a/tools/uncrustify.cfg +++ b/tools/uncrustify.cfg @@ -1323,7 +1323,7 @@ indent_using_block = true # true/false # 2: When the `:` is a continuation, indent it under `?` indent_ternary_operator = 0 # unsigned number -# Whether to indent the statments inside ternary operator. +# Whether to indent the statements inside ternary operator. indent_inside_ternary_operator = false # true/false # If true, the indentation of the chunks after a `return` sequence will be set at return indentation column. @@ -1779,7 +1779,7 @@ nl_func_call_args_multi_line = false # true/false # different lines. nl_func_call_end_multi_line = false # true/false -# Whether to respect nl_func_call_XXX option incase of closure args. +# Whether to respect nl_func_call_XXX option in case of closure args. nl_func_call_args_multi_line_ignore_closures = false # true/false # Whether to add a newline after '<' of a template parameter list. @@ -2570,7 +2570,7 @@ align_oc_decl_colon = false # true/false # (OC) Whether to not align parameters in an Objectve-C message call if first # colon is not on next line of the message call (the same way Xcode does -# aligment) +# alignment) align_oc_msg_colon_xcode_like = false # true/false # @@ -2916,28 +2916,28 @@ pp_define_at_level = false # true/false pp_ignore_define_body = false # true/false # Whether to indent case statements between #if, #else, and #endif. -# Only applies to the indent of the preprocesser that the case statements +# Only applies to the indent of the preprocessor that the case statements # directly inside of. # # Default: true pp_indent_case = true # true/false # Whether to indent whole function definitions between #if, #else, and #endif. -# Only applies to the indent of the preprocesser that the function definition +# Only applies to the indent of the preprocessor that the function definition # is directly inside of. # # Default: true pp_indent_func_def = true # true/false # Whether to indent extern C blocks between #if, #else, and #endif. -# Only applies to the indent of the preprocesser that the extern block is +# Only applies to the indent of the preprocessor that the extern block is # directly inside of. # # Default: true pp_indent_extern = true # true/false # Whether to indent braces directly inside #if, #else, and #endif. -# Only applies to the indent of the preprocesser that the braces are directly +# Only applies to the indent of the preprocessor that the braces are directly # inside of. # # Default: true diff --git a/tools/verifygitlog.py b/tools/verifygitlog.py index cc4b80f4a9..24171f9c68 100755 --- a/tools/verifygitlog.py +++ b/tools/verifygitlog.py @@ -101,7 +101,7 @@ def run(args): def show_help(): print("usage: verifygitlog.py [-v -n -h] ...") - print("-v : increase verbosity, can be speficied multiple times") + print("-v : increase verbosity, can be specified multiple times") print("-n : do not print multi-line suggestions") print("-h : print this help message and exit") print("... : arguments passed to git log to retrieve commits to verify")