renesas-ra: Fix spelling mistakes found by codespell.

And enable codespell for this port in `pyproject.toml`.

Signed-off-by: Damien George <damien@micropython.org>
pull/13763/head
Damien George 2024-03-07 14:12:15 +11:00
rodzic ab6d59d7bd
commit b3f2f18f92
13 zmienionych plików z 17 dodań i 18 usunięć

Wyświetl plik

@ -484,7 +484,7 @@ FILE2H = $(TOP)/tools/file2h.py
# List of sources for qstr extraction # List of sources for qstr extraction
SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C) $(GEN_PINS_SRC) 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 # 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 # 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 # case when pins.h is modified. But when it doesn't exist, we don't know

Wyświetl plik

@ -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 The above command should produce binary images `firmware.hex` in the
build-EK_RA6M2/` subdirectory (or the equivalent directory for the board specified). 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. Please refer to the `renesas-ra` quick reference.
## Known issues ## Known issues

Wyświetl plik

@ -40,7 +40,7 @@
// I2C (not supported) // I2C (not supported)
// #define MICROPY_HW_I2C0_SCL (pin_P204) // Conflict with SPI1 // #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_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_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_SCL (pin_P100) // Conflict with PMOD A (MISOA_A)
// #define MICROPY_HW_I2C1_SDA (pin_P101) // Conflict with PMOD A (MOSIA_A) // #define MICROPY_HW_I2C1_SDA (pin_P101) // Conflict with PMOD A (MOSIA_A)

Wyświetl plik

@ -11,7 +11,7 @@ extern "C" {
#define SCI_UART_CFG_RS485_SUPPORT (0) #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 * because the renesas-ra has own interrupt handlers for SCI and
* symbol conflict happens. * symbol conflict happens.
*/ */

Wyświetl plik

@ -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) { 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); 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) { 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) {

Wyświetl plik

@ -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) { 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); 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) { 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) {

Wyświetl plik

@ -164,7 +164,7 @@ __attribute__((naked)) void PendSV_Handler(void) {
"bl pyb_thread_next\n" // get next thread to execute "bl pyb_thread_next\n" // get next thread to execute
"mov lr, r4\n" // restore lr "mov lr, r4\n" // restore lr
"mov sp, r0\n" // switch stacks "mov sp, r0\n" // switch stacks
"msr primask, r5\n" // reenable interrupts "msr primask, r5\n" // re-enable interrupts
"vpop {s16-s31}\n" "vpop {s16-s31}\n"
"pop {r4-r11, lr}\n" "pop {r4-r11, lr}\n"
"bx lr\n" // return from interrupt; will return to new thread "bx lr\n" // return from interrupt; will return to new thread

Wyświetl plik

@ -625,7 +625,7 @@ static void ra_i2c_ictei_isr(R_IIC0_Type *i2c_inst) {
action->m_status = RA_I2C_STATUS_DataSendCompleted; action->m_status = RA_I2C_STATUS_DataSendCompleted;
i2c_inst->ICCR2_b.SP = 1; i2c_inst->ICCR2_b.SP = 1;
} else { } 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 { } else {
ra_i2c_xaction_start(i2c_inst, action, true); ra_i2c_xaction_start(i2c_inst, action, true);

Wyświetl plik

@ -520,7 +520,7 @@ static const ra_icu_pin_t ra_irq_pins[] = {
#endif #endif
#else #else
#error "CMSIS MCU Series is not speficied." #error "CMSIS MCU Series is not specified."
#endif #endif
}; };
#define ICU_PINS_SIZE (sizeof(ra_irq_pins) / sizeof(ra_icu_pin_t)) #define ICU_PINS_SIZE (sizeof(ra_irq_pins) / sizeof(ra_icu_pin_t))

Wyświetl plik

@ -1210,7 +1210,7 @@ void ra_sci_tx_ch(uint32_t ch, int c) {
if ((scr & 0xa0) != 0) { if ((scr & 0xa0) != 0) {
sci_regs[idx]->SCR &= ~0xa0; 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); 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) { void sci_uart_rxi_isr(void) {
IRQn_Type irq = R_FSP_CurrentIrqGet(); IRQn_Type irq = R_FSP_CurrentIrqGet();
uint32_t ch = irq_to_ch[(uint32_t)irq]; uint32_t ch = irq_to_ch[(uint32_t)irq];
ra_sci_isr_rx(ch); ra_sci_isr_rx(ch);
} }
/* tx interrupt */ /* tx-interrupt */
void sci_uart_txi_isr(void) { void sci_uart_txi_isr(void) {
IRQn_Type irq = R_FSP_CurrentIrqGet(); IRQn_Type irq = R_FSP_CurrentIrqGet();
uint32_t ch = irq_to_ch[(uint32_t)irq]; uint32_t ch = irq_to_ch[(uint32_t)irq];
ra_sci_isr_tx(ch); ra_sci_isr_tx(ch);
} }
/* er interrupt */ /* er-interrupt */
void sci_uart_eri_isr(void) { void sci_uart_eri_isr(void) {
IRQn_Type irq = R_FSP_CurrentIrqGet(); IRQn_Type irq = R_FSP_CurrentIrqGet();
uint32_t ch = irq_to_ch[(uint32_t)irq]; uint32_t ch = irq_to_ch[(uint32_t)irq];
ra_sci_isr_er(ch); ra_sci_isr_er(ch);
} }
/* te interrupt */ /* te-interrupt */
void sci_uart_tei_isr(void) { void sci_uart_tei_isr(void) {
IRQn_Type irq = R_FSP_CurrentIrqGet(); IRQn_Type irq = R_FSP_CurrentIrqGet();
uint32_t ch = irq_to_ch[(uint32_t)irq]; uint32_t ch = irq_to_ch[(uint32_t)irq];

Wyświetl plik

@ -49,7 +49,7 @@ void SysTick_Handler(void) {
uint32_t uw_tick = uwTick + 1; uint32_t uw_tick = uwTick + 1;
uwTick = uw_tick; 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 // the COUNTFLAG bit, which makes the logic in mp_hal_ticks_us
// work properly. // work properly.
SysTick->CTRL; SysTick->CTRL;

Wyświetl plik

@ -99,7 +99,7 @@ STATIC void pyb_timer_print(const mp_print_t *print, mp_obj_t self_in, mp_print_
/// ///
/// Keyword arguments: /// 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 /// view this as the frequency with which the timer goes through
/// one complete cycle. /// 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 /// If only a channel number is passed, then a previously initialized channel
/// object is returned (or `None` if there is no previous 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 /// Each channel can be configured to perform pwm, output compare, or
/// input capture. All channels share the same underlying timer, which means /// input capture. All channels share the same underlying timer, which means

Wyświetl plik

@ -14,7 +14,6 @@ skip = """
./ports/cc3200/simplelink,\ ./ports/cc3200/simplelink,\
./ports/cc3200/telnet,\ ./ports/cc3200/telnet,\
./ports/nrf/drivers/bluetooth/s1*,\ ./ports/nrf/drivers/bluetooth/s1*,\
./ports/renesas-ra,\
./ports/stm32/usbhost,\ ./ports/stm32/usbhost,\
./tests,\ ./tests,\
ACKNOWLEDGEMENTS,\ ACKNOWLEDGEMENTS,\