From b3f2f18f927fa2fad10daf63d8c391331f5edf58 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 7 Mar 2024 14:12:15 +1100 Subject: [PATCH] renesas-ra: Fix spelling mistakes found by codespell. And enable codespell for this port in `pyproject.toml`. Signed-off-by: Damien George --- ports/renesas-ra/Makefile | 2 +- ports/renesas-ra/README.md | 2 +- ports/renesas-ra/boards/EK_RA4M1/mpconfigboard.h | 2 +- ports/renesas-ra/fsp_cfg/r_sci_uart_cfg.h | 2 +- ports/renesas-ra/machine_dac.c | 2 +- ports/renesas-ra/machine_pwm.c | 2 +- ports/renesas-ra/pendsv.c | 2 +- ports/renesas-ra/ra/ra_i2c.c | 2 +- ports/renesas-ra/ra/ra_icu.c | 2 +- ports/renesas-ra/ra/ra_sci.c | 10 +++++----- ports/renesas-ra/systick.c | 2 +- ports/renesas-ra/timer.c | 4 ++-- pyproject.toml | 1 - 13 files changed, 17 insertions(+), 18 deletions(-) diff --git a/ports/renesas-ra/Makefile b/ports/renesas-ra/Makefile index 1e9cd2db5b..f8b46fe453 100644 --- a/ports/renesas-ra/Makefile +++ b/ports/renesas-ra/Makefile @@ -484,7 +484,7 @@ FILE2H = $(TOP)/tools/file2h.py # List of sources for qstr extraction SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C) $(GEN_PINS_SRC) -# Making OBJ use an order-only depenedency on the generated pins.h file +# Making OBJ use an order-only dependency on the generated pins.h file # has the side effect of making the pins.h file before we actually compile # any of the objects. The normal dependency generation will deal with the # case when pins.h is modified. But when it doesn't exist, we don't know diff --git a/ports/renesas-ra/README.md b/ports/renesas-ra/README.md index 77b952178d..4b3a7696fa 100644 --- a/ports/renesas-ra/README.md +++ b/ports/renesas-ra/README.md @@ -63,7 +63,7 @@ passed as the argument to `BOARD=`; for example `RA4M1_CLICKER`, `EK_RA4M1`, The above command should produce binary images `firmware.hex` in the build-EK_RA6M2/` subdirectory (or the equivalent directory for the board specified). -## Supported/Unsupprted funtions +## Supported/Unsupported functions Please refer to the `renesas-ra` quick reference. ## Known issues diff --git a/ports/renesas-ra/boards/EK_RA4M1/mpconfigboard.h b/ports/renesas-ra/boards/EK_RA4M1/mpconfigboard.h index e7cce5e24a..db4d2d9d63 100644 --- a/ports/renesas-ra/boards/EK_RA4M1/mpconfigboard.h +++ b/ports/renesas-ra/boards/EK_RA4M1/mpconfigboard.h @@ -40,7 +40,7 @@ // I2C (not supported) // #define MICROPY_HW_I2C0_SCL (pin_P204) // Conflict with SPI1 // #define MICROPY_HW_I2C0_SDA (pin_P407) // Conflict with USB_VBUS -// #define MICROPY_HW_I2C0_SCL (pin_P400) // Conflict wiht PMOD B (GPIO) +// #define MICROPY_HW_I2C0_SCL (pin_P400) // Conflict with PMOD B (GPIO) // #define MICROPY_HW_I2C0_SDA (pin_P401) // Conflict with PMOD B (TXD1) // #define MICROPY_HW_I2C1_SCL (pin_P100) // Conflict with PMOD A (MISOA_A) // #define MICROPY_HW_I2C1_SDA (pin_P101) // Conflict with PMOD A (MOSIA_A) diff --git a/ports/renesas-ra/fsp_cfg/r_sci_uart_cfg.h b/ports/renesas-ra/fsp_cfg/r_sci_uart_cfg.h index bbc6dc5522..578025041e 100644 --- a/ports/renesas-ra/fsp_cfg/r_sci_uart_cfg.h +++ b/ports/renesas-ra/fsp_cfg/r_sci_uart_cfg.h @@ -11,7 +11,7 @@ extern "C" { #define SCI_UART_CFG_RS485_SUPPORT (0) /* - * Disable r_sci_uart.c's interrupt handlers by defining followings + * Disable r_sci_uart.c's interrupt handlers by defining following * because the renesas-ra has own interrupt handlers for SCI and * symbol conflict happens. */ diff --git a/ports/renesas-ra/machine_dac.c b/ports/renesas-ra/machine_dac.c index 6fd23c2388..0d9c779497 100644 --- a/ports/renesas-ra/machine_dac.c +++ b/ports/renesas-ra/machine_dac.c @@ -54,7 +54,7 @@ STATIC machine_dac_obj_t machine_dac_obj[] = { STATIC void machine_dac_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { machine_dac_obj_t *self = MP_OBJ_TO_PTR(self_in); // const char *qstr_str(qstr q); - mp_printf(print, "DAC(DA%d [#%d], runing=%u, out=%u mV)", self->ch, self->dac->pin, self->active, self->mv); + mp_printf(print, "DAC(DA%d [#%d], active=%u, out=%u mV)", self->ch, self->dac->pin, self->active, self->mv); } STATIC mp_obj_t machine_dac_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { diff --git a/ports/renesas-ra/machine_pwm.c b/ports/renesas-ra/machine_pwm.c index 936f698e33..69dc5bad59 100644 --- a/ports/renesas-ra/machine_pwm.c +++ b/ports/renesas-ra/machine_pwm.c @@ -136,7 +136,7 @@ STATIC machine_pwm_obj_t machine_pwm_obj[] = { STATIC void mp_machine_pwm_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { machine_pwm_obj_t *self = MP_OBJ_TO_PTR(self_in); - mp_printf(print, "PWM(GTIOC %d%c[#%d], runing=%u, freq=%u, duty=%u)", self->ch, self->id, self->pwm->pin, self->active, self->freq, self->duty); + mp_printf(print, "PWM(GTIOC %d%c[#%d], active=%u, freq=%u, duty=%u)", self->ch, self->id, self->pwm->pin, self->active, self->freq, self->duty); } STATIC void mp_machine_pwm_init_helper(machine_pwm_obj_t *self, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/ports/renesas-ra/pendsv.c b/ports/renesas-ra/pendsv.c index d4c4496f1b..9c908addb5 100644 --- a/ports/renesas-ra/pendsv.c +++ b/ports/renesas-ra/pendsv.c @@ -164,7 +164,7 @@ __attribute__((naked)) void PendSV_Handler(void) { "bl pyb_thread_next\n" // get next thread to execute "mov lr, r4\n" // restore lr "mov sp, r0\n" // switch stacks - "msr primask, r5\n" // reenable interrupts + "msr primask, r5\n" // re-enable interrupts "vpop {s16-s31}\n" "pop {r4-r11, lr}\n" "bx lr\n" // return from interrupt; will return to new thread diff --git a/ports/renesas-ra/ra/ra_i2c.c b/ports/renesas-ra/ra/ra_i2c.c index 701f4d6aa8..ba2fa72653 100644 --- a/ports/renesas-ra/ra/ra_i2c.c +++ b/ports/renesas-ra/ra/ra_i2c.c @@ -625,7 +625,7 @@ static void ra_i2c_ictei_isr(R_IIC0_Type *i2c_inst) { action->m_status = RA_I2C_STATUS_DataSendCompleted; i2c_inst->ICCR2_b.SP = 1; } else { - action->m_status = RA_I2C_STATUS_Stopped; // set Stopped status insted STOP condition + action->m_status = RA_I2C_STATUS_Stopped; // set Stopped status instead STOP condition } } else { ra_i2c_xaction_start(i2c_inst, action, true); diff --git a/ports/renesas-ra/ra/ra_icu.c b/ports/renesas-ra/ra/ra_icu.c index caac8bfe22..633c3c3de0 100644 --- a/ports/renesas-ra/ra/ra_icu.c +++ b/ports/renesas-ra/ra/ra_icu.c @@ -520,7 +520,7 @@ static const ra_icu_pin_t ra_irq_pins[] = { #endif #else - #error "CMSIS MCU Series is not speficied." + #error "CMSIS MCU Series is not specified." #endif }; #define ICU_PINS_SIZE (sizeof(ra_irq_pins) / sizeof(ra_icu_pin_t)) diff --git a/ports/renesas-ra/ra/ra_sci.c b/ports/renesas-ra/ra/ra_sci.c index 81f3ff9675..9fb44090d3 100644 --- a/ports/renesas-ra/ra/ra_sci.c +++ b/ports/renesas-ra/ra/ra_sci.c @@ -1210,7 +1210,7 @@ void ra_sci_tx_ch(uint32_t ch, int c) { if ((scr & 0xa0) != 0) { sci_regs[idx]->SCR &= ~0xa0; } - sci_regs[idx]->SCR |= 0xa0; /* TIE and TE enable */ + sci_regs[idx]->SCR |= 0xa0; /* TIE- and TE-interrupt enable */ } ra_enable_irq(state); } @@ -1412,28 +1412,28 @@ void ra_sci_deinit(uint32_t ch) { } } -/* rx interrupt */ +/* rx-interrupt */ void sci_uart_rxi_isr(void) { IRQn_Type irq = R_FSP_CurrentIrqGet(); uint32_t ch = irq_to_ch[(uint32_t)irq]; ra_sci_isr_rx(ch); } -/* tx interrupt */ +/* tx-interrupt */ void sci_uart_txi_isr(void) { IRQn_Type irq = R_FSP_CurrentIrqGet(); uint32_t ch = irq_to_ch[(uint32_t)irq]; ra_sci_isr_tx(ch); } -/* er interrupt */ +/* er-interrupt */ void sci_uart_eri_isr(void) { IRQn_Type irq = R_FSP_CurrentIrqGet(); uint32_t ch = irq_to_ch[(uint32_t)irq]; ra_sci_isr_er(ch); } -/* te interrupt */ +/* te-interrupt */ void sci_uart_tei_isr(void) { IRQn_Type irq = R_FSP_CurrentIrqGet(); uint32_t ch = irq_to_ch[(uint32_t)irq]; diff --git a/ports/renesas-ra/systick.c b/ports/renesas-ra/systick.c index 95ca808301..6fa02a2b6e 100644 --- a/ports/renesas-ra/systick.c +++ b/ports/renesas-ra/systick.c @@ -49,7 +49,7 @@ void SysTick_Handler(void) { uint32_t uw_tick = uwTick + 1; uwTick = uw_tick; - // Read the systick control regster. This has the side effect of clearing + // Read the systick control register. This has the side effect of clearing // the COUNTFLAG bit, which makes the logic in mp_hal_ticks_us // work properly. SysTick->CTRL; diff --git a/ports/renesas-ra/timer.c b/ports/renesas-ra/timer.c index 04bd752b98..1b32bc1eee 100644 --- a/ports/renesas-ra/timer.c +++ b/ports/renesas-ra/timer.c @@ -99,7 +99,7 @@ STATIC void pyb_timer_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ /// /// Keyword arguments: /// -/// - `freq` - specifies the periodic frequency of the timer. You migh also +/// - `freq` - specifies the periodic frequency of the timer. You might also /// view this as the frequency with which the timer goes through /// one complete cycle. ////// @@ -215,7 +215,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_timer_deinit_obj, pyb_timer_deinit); /// If only a channel number is passed, then a previously initialized channel /// object is returned (or `None` if there is no previous channel). /// -/// Othwerwise, a TimerChannel object is initialized and returned. +/// Otherwise, a TimerChannel object is initialized and returned. /// /// Each channel can be configured to perform pwm, output compare, or /// input capture. All channels share the same underlying timer, which means diff --git a/pyproject.toml b/pyproject.toml index 6c813f5a1f..0b3a40d9c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ skip = """ ./ports/cc3200/simplelink,\ ./ports/cc3200/telnet,\ ./ports/nrf/drivers/bluetooth/s1*,\ -./ports/renesas-ra,\ ./ports/stm32/usbhost,\ ./tests,\ ACKNOWLEDGEMENTS,\