diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index 4e09ae6c65..da46a78311 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -16,7 +16,7 @@ set(includes "deprecated" # Always included linker fragments set(ldfragments "") -# ADC related source files (dprecated) +# ADC related source files (deprecated) if(CONFIG_SOC_ADC_SUPPORTED) list(APPEND srcs "deprecated/adc_legacy.c") endif() diff --git a/components/driver/Kconfig b/components/driver/Kconfig index 18e46e8cd0..ceda88e3ba 100644 --- a/components/driver/Kconfig +++ b/components/driver/Kconfig @@ -18,7 +18,7 @@ menu "Driver Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy adc driver (driver/adc.h). + Whether to suppress the deprecation warnings when using legacy adc driver (driver/adc.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -55,7 +55,7 @@ menu "Driver Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy adc calibration + Whether to suppress the deprecation warnings when using legacy adc calibration driver (esp_adc_cal.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -69,7 +69,7 @@ menu "Driver Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy MCPWM driver (driver/mcpwm.h). + Whether to suppress the deprecation warnings when using legacy MCPWM driver (driver/mcpwm.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. endmenu # Legacy MCPWM Driver Configurations @@ -80,7 +80,7 @@ menu "Driver Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy timer group driver (driver/timer.h). + Whether to suppress the deprecation warnings when using legacy timer group driver (driver/timer.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -92,7 +92,7 @@ menu "Driver Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy rmt driver (driver/rmt.h). + Whether to suppress the deprecation warnings when using legacy rmt driver (driver/rmt.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. endmenu # Legacy RMT Driver Configurations diff --git a/components/driver/deprecated/adc_dma_legacy.c b/components/driver/deprecated/adc_dma_legacy.c index d821e687cd..dd3e9f3a72 100644 --- a/components/driver/deprecated/adc_dma_legacy.c +++ b/components/driver/deprecated/adc_dma_legacy.c @@ -126,7 +126,7 @@ typedef struct adc_digi_context_t { RingbufHandle_t ringbuf_hdl; //RX ringbuffer handler intptr_t rx_eof_desc_addr; //eof descriptor address of RX channel bool ringbuf_overflow_flag; //1: ringbuffer overflow - bool driver_start_flag; //1: driver is started; 0: driver is stoped + bool driver_start_flag; //1: driver is started; 0: driver is stopped bool use_adc1; //1: ADC unit1 will be used; 0: ADC unit1 won't be used. bool use_adc2; //1: ADC unit2 will be used; 0: ADC unit2 won't be used. This determines whether to acquire sar_adc2_mutex lock or not. adc_atten_t adc1_atten; //Attenuation for ADC1. On this chip each ADC can only support one attenuation. diff --git a/components/driver/deprecated/adc_i2s_deprecated.c b/components/driver/deprecated/adc_i2s_deprecated.c index 41b3d75ee4..7e1cd1f318 100644 --- a/components/driver/deprecated/adc_i2s_deprecated.c +++ b/components/driver/deprecated/adc_i2s_deprecated.c @@ -5,7 +5,7 @@ */ /*---------------------------------------------------------------------------------- - This file contains ESP32 and ESP32S2 Depricated ADC APIs and functions + This file contains ESP32 and ESP32S2 Deprecated ADC APIs and functions -----------------------------------------------------------------------------------*/ #include "sdkconfig.h" @@ -52,7 +52,7 @@ esp_pm_lock_handle_t adc_digi_arbiter_lock = NULL; #if CONFIG_IDF_TARGET_ESP32 /*--------------------------------------------------------------- - ESP32 Depricated ADC APIs and functions + ESP32 Deprecated ADC APIs and functions ---------------------------------------------------------------*/ #define DIG_ADC_OUTPUT_FORMAT_DEFUALT (ADC_DIGI_FORMAT_12BIT) #define DIG_ADC_ATTEN_DEFUALT (ADC_ATTEN_DB_12) diff --git a/components/driver/deprecated/adc_legacy.c b/components/driver/deprecated/adc_legacy.c index ad9605d358..87e66e56a8 100644 --- a/components/driver/deprecated/adc_legacy.c +++ b/components/driver/deprecated/adc_legacy.c @@ -879,7 +879,7 @@ static void adc_hal_onetime_start(adc_unit_t adc_n, uint32_t clk_src_freq_hz) esp_rom_delay_us(delay); adc_oneshot_ll_start(true); - //No need to delay here. Becuase if the start signal is not seen, there won't be a done intr. + //No need to delay here. Because if the start signal is not seen, there won't be a done intr. #else (void)clk_src_freq_hz; adc_oneshot_ll_start(adc_n); diff --git a/components/driver/deprecated/driver/adc.h b/components/driver/deprecated/driver/adc.h index 21666d5710..d5d683c63c 100644 --- a/components/driver/deprecated/driver/adc.h +++ b/components/driver/deprecated/driver/adc.h @@ -285,7 +285,7 @@ esp_err_t adc_vref_to_gpio(adc_unit_t adc_unit, gpio_num_t gpio); /** * @brief Initialize the Digital ADC. * - * @param init_config Pointer to Digital ADC initilization config. Refer to ``adc_digi_init_config_t``. + * @param init_config Pointer to Digital ADC initialization config. Refer to ``adc_digi_init_config_t``. * * @return * - ESP_ERR_INVALID_ARG If the combination of arguments is invalid. @@ -340,7 +340,7 @@ esp_err_t adc_digi_deinitialize(void); /** * @brief Setting the digital controller. * - * @param config Pointer to digital controller paramter. Refer to ``adc_digi_config_t``. + * @param config Pointer to digital controller parameter. Refer to ``adc_digi_config_t``. * * @return * - ESP_ERR_INVALID_STATE Driver state is invalid. diff --git a/components/driver/deprecated/driver/dac.h b/components/driver/deprecated/driver/dac.h index 2a30cb9ca2..d307250288 100644 --- a/components/driver/deprecated/driver/dac.h +++ b/components/driver/deprecated/driver/dac.h @@ -129,7 +129,7 @@ esp_err_t dac_digi_deinit(void); /** * @brief Setting the DAC digital controller. * - * @param cfg Pointer to digital controller paramter. See ``dac_digi_config_t``. + * @param cfg Pointer to digital controller parameter. See ``dac_digi_config_t``. * * @return * - ESP_OK success diff --git a/components/driver/deprecated/driver/i2s.h b/components/driver/deprecated/driver/i2s.h index 488cd476f9..58c8bf433d 100644 --- a/components/driver/deprecated/driver/i2s.h +++ b/components/driver/deprecated/driver/i2s.h @@ -276,7 +276,7 @@ esp_err_t i2s_zero_dma_buffer(i2s_port_t i2s_num); * * @param i2s_num I2S port number * - * @param pcm_cfg including mode selection and a/u-law decompress or compress configuration paramater + * @param pcm_cfg including mode selection and a/u-law decompress or compress configuration parameter * * @return * - ESP_OK Success diff --git a/components/driver/deprecated/driver/i2s_types_legacy.h b/components/driver/deprecated/driver/i2s_types_legacy.h index ad3e5f46d2..7e6f4afaf5 100644 --- a/components/driver/deprecated/driver/i2s_types_legacy.h +++ b/components/driver/deprecated/driver/i2s_types_legacy.h @@ -51,7 +51,7 @@ typedef enum { #if SOC_I2S_SUPPORTS_TDM // Bit map of activated chan. // There are 16 channels in TDM mode. - // For TX module, only the activated channel send the audio data, the unactivated channel send a constant(configurable) or will be skiped if 'skip_msk' is set. + // For TX module, only the activated channel send the audio data, the unactivated channel send a constant(configurable) or will be skipped if 'skip_msk' is set. // For RX module, only receive the audio data in activated channels, the data in unactivated channels will be ignored. // the bit map of activated channel can not exceed the maximum enabled channel number (i.e. 0x10000 << total_chan_num). // e.g: active_chan_mask = (I2S_TDM_ACTIVE_CH0 | I2S_TDM_ACTIVE_CH3), here the active_chan_number is 2 and total_chan_num is not supposed to be smaller than 4. diff --git a/components/driver/deprecated/driver/timer.h b/components/driver/deprecated/driver/timer.h index 21fd1cf87a..17a2402029 100644 --- a/components/driver/deprecated/driver/timer.h +++ b/components/driver/deprecated/driver/timer.h @@ -215,7 +215,7 @@ esp_err_t timer_isr_callback_remove(timer_group_t group_num, timer_idx_t timer_n * @param handle Pointer to return handle. If non-NULL, a handle for the interrupt will * be returned here. * - * @note If use this function to reigster ISR, you need to write the whole ISR. + * @note If use this function to register ISR, you need to write the whole ISR. * In the interrupt handler, you need to call timer_spinlock_take(..) before * your handling, and call timer_spinlock_give(...) after your handling. * diff --git a/components/driver/deprecated/driver/timer_types_legacy.h b/components/driver/deprecated/driver/timer_types_legacy.h index cb6fa3ec85..6f3c9c44c6 100644 --- a/components/driver/deprecated/driver/timer_types_legacy.h +++ b/components/driver/deprecated/driver/timer_types_legacy.h @@ -115,7 +115,7 @@ typedef int timer_src_clk_t; * - False Not do task yield at the end of ISR * * @note If you called FreeRTOS functions in callback, you need to return true or false based on - * the retrun value of argument `pxHigherPriorityTaskWoken`. + * the return value of argument `pxHigherPriorityTaskWoken`. * For example, `xQueueSendFromISR` is called in callback, if the return value `pxHigherPriorityTaskWoken` * of any FreeRTOS calls is pdTRUE, return true; otherwise return false. */ diff --git a/components/driver/deprecated/i2s_legacy.c b/components/driver/deprecated/i2s_legacy.c index 433481beb8..4c8c974cf6 100644 --- a/components/driver/deprecated/i2s_legacy.c +++ b/components/driver/deprecated/i2s_legacy.c @@ -534,7 +534,7 @@ static inline uint32_t i2s_get_buf_size(i2s_port_t i2s_num) } } if (bufsize / bytes_per_frame != p_i2s[i2s_num]->dma_frame_num) { - ESP_LOGW(TAG, "dma frame num is adjusted to %"PRIu32" to algin the dma buffer with %"PRIu32 + ESP_LOGW(TAG, "dma frame num is adjusted to %"PRIu32" to align the dma buffer with %"PRIu32 ", bufsize = %"PRIu32, bufsize / bytes_per_frame, alignment, bufsize); } #else @@ -626,7 +626,7 @@ static esp_err_t i2s_realloc_dma_buffer(i2s_port_t i2s_num, i2s_dma_t *dma_obj) static esp_err_t i2s_destroy_dma_object(i2s_port_t i2s_num, i2s_dma_t **dma) { - /* Check if DMA truely need destroy */ + /* Check if DMA truly need destroy */ ESP_RETURN_ON_FALSE(p_i2s[i2s_num], ESP_ERR_INVALID_ARG, TAG, "I2S not initialized yet"); if (!(*dma)) { return ESP_OK; @@ -662,7 +662,7 @@ static esp_err_t i2s_create_dma_object(i2s_port_t i2s_num, i2s_dma_t **dma) /* Allocate new DMA structure */ *dma = (i2s_dma_t *) calloc(1, sizeof(i2s_dma_t)); ESP_RETURN_ON_FALSE(*dma, ESP_ERR_NO_MEM, TAG, "DMA object allocate failed"); - /* Allocate DMA buffer poiter */ + /* Allocate DMA buffer pointer */ (*dma)->buf = (char **)heap_caps_calloc(buf_cnt, sizeof(char *), MALLOC_CAP_DMA); if (!(*dma)->buf) { goto err; @@ -1536,7 +1536,7 @@ static esp_err_t i2s_init_legacy(i2s_port_t i2s_num, int intr_alloc_flag) i2s_set_slot_legacy(i2s_num); i2s_set_clock_legacy(i2s_num); - ESP_RETURN_ON_ERROR(i2s_dma_intr_init(i2s_num, intr_alloc_flag), TAG, "I2S interrupt initailze failed"); + ESP_RETURN_ON_ERROR(i2s_dma_intr_init(i2s_num, intr_alloc_flag), TAG, "I2S interrupt initialize failed"); ESP_RETURN_ON_ERROR(i2s_dma_object_init(i2s_num), TAG, "I2S dma object create failed"); if (p_i2s[i2s_num]->dir & I2S_DIR_TX) { ESP_RETURN_ON_ERROR(i2s_realloc_dma_buffer(i2s_num, p_i2s[i2s_num]->tx), TAG, "Allocate I2S dma tx buffer failed"); @@ -1656,7 +1656,7 @@ esp_err_t i2s_driver_install(i2s_port_t i2s_num, const i2s_config_t *i2s_config, p_i2s[i2s_num] = i2s_obj; i2s_hal_init(&i2s_obj->hal, i2s_num); - /* Step 3: Store and assign configarations */ + /* Step 3: Store and assign configurations */ i2s_mode_identify(i2s_num, i2s_config); ESP_GOTO_ON_ERROR(i2s_config_transfer(i2s_num, i2s_config), err, TAG, "I2S install failed"); i2s_obj->dma_desc_num = i2s_config->dma_desc_num; @@ -1948,7 +1948,7 @@ esp_err_t i2s_set_pin(i2s_port_t i2s_num, const i2s_pin_config_t *pin) } } - /* Set data input/ouput GPIO */ + /* Set data input/output GPIO */ gpio_matrix_out_check_and_set(pin->data_out_num, i2s_periph_signal[i2s_num].data_out_sig, 0, 0); gpio_matrix_in_check_and_set(pin->data_in_num, i2s_periph_signal[i2s_num].data_in_sig, 0); return ESP_OK; diff --git a/components/driver/deprecated/mcpwm_legacy.c b/components/driver/deprecated/mcpwm_legacy.c index 47be551eb4..b2efec86f1 100644 --- a/components/driver/deprecated/mcpwm_legacy.c +++ b/components/driver/deprecated/mcpwm_legacy.c @@ -850,7 +850,7 @@ esp_err_t mcpwm_capture_enable_channel(mcpwm_unit_t mcpwm_num, mcpwm_capture_cha MCPWM_CAP_EXIST_ERROR); mcpwm_hal_context_t *hal = &context[mcpwm_num].hal; - // enable MCPWM module incase user don't use `mcpwm_init` at all. always increase reference count + // enable MCPWM module in case user don't use `mcpwm_init` at all. always increase reference count mcpwm_module_enable(mcpwm_num); mcpwm_hal_init_config_t init_config = { diff --git a/components/driver/deprecated/pcnt_legacy.c b/components/driver/deprecated/pcnt_legacy.c index bb0ec38773..1c33b4aa77 100644 --- a/components/driver/deprecated/pcnt_legacy.c +++ b/components/driver/deprecated/pcnt_legacy.c @@ -368,7 +368,7 @@ static inline esp_err_t _pcnt_unit_config(pcnt_port_t pcnt_port, const pcnt_conf PCNT_CHECK(ctrl_io < 0 || GPIO_IS_VALID_GPIO(ctrl_io), "PCNT ctrl io error", ESP_ERR_INVALID_ARG); PCNT_CHECK((pcnt_config->pos_mode < PCNT_COUNT_MAX) && (pcnt_config->neg_mode < PCNT_COUNT_MAX), PCNT_COUNT_MODE_ERR_STR, ESP_ERR_INVALID_ARG); PCNT_CHECK((pcnt_config->hctrl_mode < PCNT_MODE_MAX) && (pcnt_config->lctrl_mode < PCNT_MODE_MAX), PCNT_CTRL_MODE_ERR_STR, ESP_ERR_INVALID_ARG); - /*Enalbe hardware module*/ + /*Enable hardware module*/ static bool pcnt_enable = false; if (pcnt_enable == false) { PCNT_RCC_ATOMIC() { diff --git a/components/driver/deprecated/rmt_legacy.c b/components/driver/deprecated/rmt_legacy.c index 0c07090b9b..16d120725b 100644 --- a/components/driver/deprecated/rmt_legacy.c +++ b/components/driver/deprecated/rmt_legacy.c @@ -679,7 +679,7 @@ static esp_err_t rmt_internal_config(rmt_dev_t *dev, const rmt_config_t *rmt_par #endif RMT_EXIT_CRITICAL(); - ESP_LOGD(TAG, "Rmt Rx Channel %u|Gpio %u|Sclk_Hz %"PRIu32"|Div %u|Thresold %u|Filter %u", + ESP_LOGD(TAG, "Rmt Rx Channel %u|Gpio %u|Sclk_Hz %"PRIu32"|Div %u|Threshold %u|Filter %u", channel, gpio_num, rmt_source_clk_hz, clk_div, threshold, filter_cnt); } diff --git a/components/driver/deprecated/timer_legacy.c b/components/driver/deprecated/timer_legacy.c index 35e8f5846d..08261f8dd1 100644 --- a/components/driver/deprecated/timer_legacy.c +++ b/components/driver/deprecated/timer_legacy.c @@ -217,7 +217,7 @@ static void IRAM_ATTR timer_isr_default(void *arg) timer_ll_clear_intr_status(hal->dev, TIMER_LL_EVENT_ALARM(timer_id)); // call user registered callback is_awoken = timer_obj->timer_isr_fun.fn(timer_obj->timer_isr_fun.args); - // reenable alarm if required + // re-enable alarm if required uint64_t new_alarm_value = timer_obj->alarm_value; bool reenable_alarm = (new_alarm_value != old_alarm_value) || timer_obj->auto_reload_en; timer_ll_enable_alarm(hal->dev, timer_id, reenable_alarm); diff --git a/components/driver/i2c/i2c.c b/components/driver/i2c/i2c.c index 4f76cd31d5..beffa611d8 100644 --- a/components/driver/i2c/i2c.c +++ b/components/driver/i2c/i2c.c @@ -1198,7 +1198,7 @@ static esp_err_t i2c_cmd_allocate(i2c_cmd_desc_t *cmd_desc, size_t n, size_t siz /* Allocate the pointer. */ *outptr = cmd_desc->free_buffer; - /* Decrement the free size from the user's bufffer. */ + /* Decrement the free size from the user's buffer. */ cmd_desc->free_buffer += required; cmd_desc->free_size -= required; } diff --git a/components/driver/i2c/include/driver/i2c.h b/components/driver/i2c/include/driver/i2c.h index ec94b5b4ae..6d2add0db5 100644 --- a/components/driver/i2c/include/driver/i2c.h +++ b/components/driver/i2c/include/driver/i2c.h @@ -27,7 +27,7 @@ extern "C" { #endif // I2C clk flags for users to use, can be expanded in the future. -#define I2C_SCLK_SRC_FLAG_FOR_NOMAL (0) /*!< Any one clock source that is available for the specified frequency may be choosen*/ +#define I2C_SCLK_SRC_FLAG_FOR_NOMAL (0) /*!< Any one clock source that is available for the specified frequency may be chosen*/ #define I2C_SCLK_SRC_FLAG_AWARE_DFS (1 << 0) /*!< For REF tick clock, it won't change with APB.*/ #define I2C_SCLK_SRC_FLAG_LIGHT_SLEEP (1 << 1) /*!< For light sleep mode.*/ @@ -606,7 +606,7 @@ esp_err_t i2c_get_timeout(i2c_port_t i2c_num, int *timeout); * * @param i2c_num I2C port number * @param tx_trans_mode I2C sending data mode - * @param rx_trans_mode I2C receving data mode + * @param rx_trans_mode I2C receiving data mode * * @return * - ESP_OK Success diff --git a/components/driver/test_apps/components/esp_serial_slave_link/essl_sdio.c b/components/driver/test_apps/components/esp_serial_slave_link/essl_sdio.c index a5a8a43e61..121fd2cfb2 100644 --- a/components/driver/test_apps/components/esp_serial_slave_link/essl_sdio.c +++ b/components/driver/test_apps/components/esp_serial_slave_link/essl_sdio.c @@ -295,7 +295,7 @@ esp_err_t essl_sdio_send_packet(void *arg, const void *start, size_t length, uin const int block_size = 512; /* Though the driver supports to split packet of unaligned size into * length of 4x and 1~3, we still send aligned size of data to get - * higher effeciency. The length is determined by the SDIO address, and + * higher efficiency. The length is determined by the SDIO address, and * the remainning will be discard by the slave hardware. */ int block_n = len_remain / block_size; @@ -348,7 +348,7 @@ esp_err_t essl_sdio_get_packet(void *arg, void *out_data, size_t size, uint32_t len_to_send = len_remain; /* though the driver supports to split packet of unaligned size into length * of 4x and 1~3, we still get aligned size of data to get higher - * effeciency. The length is determined by the SDIO address, and the + * efficiency. The length is determined by the SDIO address, and the * remainning will be ignored by the slave hardware. */ err = sdmmc_io_read_bytes(ctx->card, 1, ESSL_CMD53_END_ADDR - len_remain, start, (len_to_send + 3) & (~3)); @@ -413,7 +413,7 @@ esp_err_t essl_sdio_update_rx_data_size(void *arg, uint32_t wait_ms) esp_err_t essl_sdio_write_reg(void *arg, uint8_t addr, uint8_t value, uint8_t *value_o, uint32_t wait_ms) { ESP_LOGV(TAG, "write_reg: 0x%02"PRIX8, value); - // addrress over range + // address over range if (addr >= 60) { return ESP_ERR_INVALID_ARG; } diff --git a/components/driver/test_apps/components/esp_serial_slave_link/essl_spi.c b/components/driver/test_apps/components/esp_serial_slave_link/essl_spi.c index 703db76cd0..9126410460 100644 --- a/components/driver/test_apps/components/esp_serial_slave_link/essl_spi.c +++ b/components/driver/test_apps/components/esp_serial_slave_link/essl_spi.c @@ -39,7 +39,7 @@ typedef struct { /* Master TX, Slave RX */ struct { size_t sent_buf_num; // Number of TX buffers that has been sent out by the master. - size_t slave_rx_buf_num; // Number of RX buffers laoded by the slave. + size_t slave_rx_buf_num; // Number of RX buffers loaded by the slave. uint16_t tx_buffer_size; /* Buffer size for Master TX / Slave RX direction. * Data with length within this size will still be regarded as one buffer. * E.g. 10 bytes data costs 2 buffers if the size is 8 bytes per buffer. */ diff --git a/components/driver/test_apps/components/esp_serial_slave_link/include/esp_serial_slave_link/essl_sdio.h b/components/driver/test_apps/components/esp_serial_slave_link/include/esp_serial_slave_link/essl_sdio.h index b786197928..123e606544 100644 --- a/components/driver/test_apps/components/esp_serial_slave_link/include/esp_serial_slave_link/essl_sdio.h +++ b/components/driver/test_apps/components/esp_serial_slave_link/include/esp_serial_slave_link/essl_sdio.h @@ -46,7 +46,7 @@ esp_err_t essl_sdio_init_dev(essl_handle_t *out_handle, const essl_sdio_config_t */ esp_err_t essl_sdio_deinit_dev(essl_handle_t handle); -//Please call `essl_` functions witout `sdio` instead of calling these functions directly. +//Please call `essl_` functions without `sdio` instead of calling these functions directly. /** @cond */ /** * SDIO Initialize process of an ESSL SDIO slave device. diff --git a/components/driver/test_apps/components/test_driver_utils/include/test_spi_utils.h b/components/driver/test_apps/components/test_driver_utils/include/test_spi_utils.h index 8a10b0021f..9513e716ad 100644 --- a/components/driver/test_apps/components/test_driver_utils/include/test_spi_utils.h +++ b/components/driver/test_apps/components/test_driver_utils/include/test_spi_utils.h @@ -261,7 +261,7 @@ esp_err_t spitest_check_data(int len, spi_transaction_t *master_t, slave_rxdata_ int r = memcmp(expected, actual, len);\ if (r != 0) {\ ESP_LOG_BUFFER_HEXDUMP("actual ", actual, len, ESP_LOG_WARN);\ - ESP_LOG_BUFFER_HEXDUMP("expecte", expected, len, ESP_LOG_INFO);\ + ESP_LOG_BUFFER_HEXDUMP("expected", expected, len, ESP_LOG_INFO);\ TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, len);\ }\ r;\ @@ -278,10 +278,10 @@ static inline int get_trans_len(spi_dup_t dup, spi_transaction_t *master_t) //remove device from bus and free the bus void master_free_device_bus(spi_device_handle_t spi); -//use this function to fix the output source when assign multiple funcitons to a same pin +//use this function to fix the output source when assign multiple functions to a same pin void spitest_gpio_output_sel(uint32_t gpio_num, int func, uint32_t signal_idx); -//use this function to fix the input source when assign multiple funcitons to a same pin +//use this function to fix the input source when assign multiple functions to a same pin void spitest_gpio_input_sel(uint32_t gpio_num, int func, uint32_t signal_idx); //Note this cs_num is the ID of the connected devices' ID, e.g. if 2 devices are connected to the bus, diff --git a/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/main/test_legacy_i2s.c b/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/main/test_legacy_i2s.c index 5547280042..e8a3b5b4f9 100644 --- a/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/main/test_legacy_i2s.c +++ b/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/main/test_legacy_i2s.c @@ -582,7 +582,7 @@ TEST_CASE("I2S_write_and_read_test_with_master_tx_and_slave_rx", "[i2s_legacy]") } length = length + bytes_read; } - // test the readed data right or not + // test the read data right or not for (int i = end_position - 99; i <= end_position; i++) { TEST_ASSERT_EQUAL_UINT8((i - end_position + 100), *(i2s_read_buff + i)); } @@ -687,7 +687,7 @@ TEST_CASE("I2S_write_and_read_test_master_rx_and_slave_tx", "[i2s_legacy]") } length = length + bytes_read; } - // test the readed data right or not + // test the read data right or not for (int i = end_position - 99; i <= end_position; i++) { TEST_ASSERT_EQUAL_UINT8((i - end_position + 100), *(i2s_read_buff + i)); } @@ -892,7 +892,7 @@ static void i2s_test_common_sample_rate(i2s_port_t id) case_cnt = 15; #endif - // Acquire the PM lock incase Dynamic Frequency Scaling(DFS) lower the frequency + // Acquire the PM lock in case Dynamic Frequency Scaling(DFS) lower the frequency #ifdef CONFIG_PM_ENABLE esp_pm_lock_handle_t pm_lock; esp_pm_lock_type_t pm_type = ESP_PM_APB_FREQ_MAX; @@ -923,7 +923,7 @@ static void i2s_test_common_sample_rate(i2s_port_t id) TEST_ESP_OK(pcnt_del_unit(pcnt_unit)); } -TEST_CASE("I2S clock freqency test", "[i2s_legacy]") +TEST_CASE("I2S clock frequency test", "[i2s_legacy]") { // master driver installed and send data i2s_config_t master_i2s_config = { diff --git a/components/driver/test_apps/legacy_i2c_driver/main/test_i2c.c b/components/driver/test_apps/legacy_i2c_driver/main/test_i2c.c index 3f53d81920..43eed52043 100644 --- a/components/driver/test_apps/legacy_i2c_driver/main/test_i2c.c +++ b/components/driver/test_apps/legacy_i2c_driver/main/test_i2c.c @@ -693,7 +693,7 @@ static void i2c_scl_freq_cal(void) const float i2c_cource_clk_period = 0.0125; int expt_cnt = 542; #else - const int i2c_source_clk_freq = 18000000; // Clock sorce: RTC + const int i2c_source_clk_freq = 18000000; // Clock source: RTC const float i2c_cource_clk_period = 0.056; int expt_cnt = 540; #endif diff --git a/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c b/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c index e42fe9fcf5..9c2c4a9287 100644 --- a/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c +++ b/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c @@ -409,7 +409,7 @@ TEST_CASE("PCNT_basic_function_test", "[pcnt]") produce_pulse(); pcnt_test_io_config(PCNT_CTRL_HIGH_LEVEL); - // initialize first, the initail value should be 0 + // initialize first, the initial value should be 0 TEST_ESP_OK(pcnt_counter_pause(PCNT_UNIT_0)); TEST_ESP_OK(pcnt_counter_clear(PCNT_UNIT_0)); TEST_ESP_OK(pcnt_get_counter_value(PCNT_UNIT_0, &test_counter)); @@ -511,7 +511,7 @@ TEST_CASE("PCNT_interrupt_method_test_control_IO_high", "[pcnt][timeout=120]") TEST_ESP_OK(pcnt_event_enable(PCNT_UNIT_0, PCNT_EVT_H_LIM)); // when arrive to max limit trigger TEST_ESP_OK(pcnt_event_enable(PCNT_UNIT_0, PCNT_EVT_L_LIM)); // when arrive to minimum limit trigger - // initialize first, the initail value should be 0 + // initialize first, the initial value should be 0 TEST_ESP_OK(pcnt_counter_pause(PCNT_UNIT_0)); TEST_ESP_OK(pcnt_counter_clear(PCNT_UNIT_0)); diff --git a/components/driver/test_apps/legacy_rmt_driver/main/test_legacy_rmt.c b/components/driver/test_apps/legacy_rmt_driver/main/test_legacy_rmt.c index d19ce20aae..e51daa88a2 100644 --- a/components/driver/test_apps/legacy_rmt_driver/main/test_legacy_rmt.c +++ b/components/driver/test_apps/legacy_rmt_driver/main/test_legacy_rmt.c @@ -627,7 +627,7 @@ TEST_CASE("RMT Interrupt IRAM Safe", "[rmt]") // install interrupt with IRAM safe TEST_ESP_OK(rmt_driver_install(tx.channel, 0, ESP_INTR_FLAG_IRAM)); - // send a large buffer, ensure the RMT hardware is still in work when we disable the flash cache afterwords + // send a large buffer, ensure the RMT hardware is still in work when we disable the flash cache afterwards rmt_item32_t items[256] = {}; for (int i = 0; i < 256; i++) { items[i].level0 = 0; diff --git a/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c b/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c index dc55d1f783..60c448ac41 100644 --- a/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c +++ b/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c @@ -841,7 +841,7 @@ TEST_CASE("Timer_interrupt_register", "[hw_timer]") #endif vTaskDelay(1000 / portTICK_PERIOD_MS); - // ISR hanlde function should be free before next ISR register. + // ISR handle function should be free before next ISR register. for (uint32_t tg_idx = 0; tg_idx < TIMER_GROUP_MAX; tg_idx++) { for (uint32_t timer_idx = 0; timer_idx < TIMER_MAX; timer_idx++) { TEST_ESP_OK(esp_intr_free(timer_isr_handle[tg_idx * SOC_TIMER_GROUP_TIMERS_PER_GROUP + timer_idx])); diff --git a/components/driver/test_apps/touch_sensor_v2/main/test_touch_v2.c b/components/driver/test_apps/touch_sensor_v2/main/test_touch_v2.c index d4e61a9a32..78b1d78a74 100644 --- a/components/driver/test_apps/touch_sensor_v2/main/test_touch_v2.c +++ b/components/driver/test_apps/touch_sensor_v2/main/test_touch_v2.c @@ -409,7 +409,7 @@ TEST_CASE("Touch Sensor reading test (SW, Timer, filter)", "[touch]") } /* - * Test the base patameter mode. + * Test the base parameter mode. * TEST POINT: * 1. measure time and sleep time setting. * 2. Charge / incharge voltage threshold setting. @@ -1287,7 +1287,7 @@ esp_err_t test_touch_filter_parameter_jitter(int jitter_step) return ESP_OK; } -TEST_CASE("Touch Sensor filter paramter test (debounce, reset, jitter)", "[touch]") +TEST_CASE("Touch Sensor filter parameter test (debounce, reset, jitter)", "[touch]") { ESP_LOGI(TAG, "*********** touch filter debounce test ********************"); TEST_ESP_OK(test_touch_filter_parameter_debounce(0)); @@ -1994,7 +1994,7 @@ TEST_CASE("Touch Sensor sleep pad wakeup deep sleep test", "[touch][ignore]") #include "touch_scope.h" /* * 0: 10 channels raw/smooth/benchmark data debug. - * 1: 5 channges smooth + benchmark data debug. + * 1: 5 changes smooth + benchmark data debug. * 2: 1 channels filter data. */ #define SCOPE_DEBUG_TYPE 2 diff --git a/components/driver/test_apps/touch_sensor_v2/main/touch_scope.c b/components/driver/test_apps/touch_sensor_v2/main/touch_scope.c index c1c07dd668..e28b2b90f4 100644 --- a/components/driver/test_apps/touch_sensor_v2/main/touch_scope.c +++ b/components/driver/test_apps/touch_sensor_v2/main/touch_scope.c @@ -120,7 +120,7 @@ int test_tp_print_to_scope(float *data, unsigned char channel_num) return 0; } else { #if ROM_UART_DRIVER_ENABLE - esp_rom_output_tx_wait_idle(uart_num); // Default print uart mumber is 0. + esp_rom_output_tx_wait_idle(uart_num); // Default print uart number is 0. for (int i = 0; i < out_len; i++) { esp_rom_output_tx_one_char(out_data[i]); } @@ -154,7 +154,7 @@ int test_tp_print_to_scope(float *data, unsigned char channel_num) esp_err_t test_tp_scope_debug_init(uint8_t uart_num, int tx_io_num, int rx_io_num, int baud_rate) { #if ROM_UART_DRIVER_ENABLE - esp_rom_output_tx_wait_idle(0); // Default print uart mumber is 0. + esp_rom_output_tx_wait_idle(0); // Default print uart number is 0. if (uart_num != 0) { esp_rom_output_set_as_console(uart_num); } diff --git a/components/driver/touch_sensor/esp32/include/driver/touch_sensor.h b/components/driver/touch_sensor/esp32/include/driver/touch_sensor.h index c6597d5b1c..737faf0249 100644 --- a/components/driver/touch_sensor/esp32/include/driver/touch_sensor.h +++ b/components/driver/touch_sensor/esp32/include/driver/touch_sensor.h @@ -122,7 +122,7 @@ esp_err_t touch_pad_isr_register(intr_handler_t fn, void *arg); * @note This function will specify the clock cycles of each measurement * and the clock is sourced from SOC_MOD_CLK_RTC_FAST, its default frequency is SOC_CLK_RC_FAST_FREQ_APPROX * The touch sensor will record the charge and discharge times during these clock cycles as the final result (raw value) - * @note If clock cyles is too small, it may lead to inaccurate results. + * @note If clock cycles is too small, it may lead to inaccurate results. * * @param clock_cycle The clock cycles of each measurement * measure_time = clock_cycle / SOC_CLK_RC_FAST_FREQ_APPROX, the maximum measure time is 0xffff / SOC_CLK_RC_FAST_FREQ_APPROX @@ -143,7 +143,7 @@ esp_err_t touch_pad_get_measurement_clock_cycles(uint16_t *clock_cycle); /** * @brief Set the interval between two measurements - * @note The touch sensor will sleep between two mesurements + * @note The touch sensor will sleep between two measurements * This function is to set the interval cycle * And the interval is clocked from SOC_MOD_CLK_RTC_SLOW, its default frequency is SOC_CLK_RC_SLOW_FREQ_APPROX * diff --git a/components/driver/touch_sensor/esp32s2/include/driver/touch_sensor.h b/components/driver/touch_sensor/esp32s2/include/driver/touch_sensor.h index 0fe459136f..06f835879f 100644 --- a/components/driver/touch_sensor/esp32s2/include/driver/touch_sensor.h +++ b/components/driver/touch_sensor/esp32s2/include/driver/touch_sensor.h @@ -62,7 +62,7 @@ esp_err_t touch_pad_get_charge_discharge_times(uint16_t *charge_discharge_times) /** * @brief Set the interval between two measurements - * @note The touch sensor will sleep between two mesurements + * @note The touch sensor will sleep between two measurements * This function is to set the interval cycle * And the interval is clocked from SOC_MOD_CLK_RTC_SLOW, its default frequency is SOC_CLK_RC_SLOW_FREQ_APPROX * diff --git a/components/driver/touch_sensor/esp32s3/include/driver/touch_sensor.h b/components/driver/touch_sensor/esp32s3/include/driver/touch_sensor.h index 0fe459136f..06f835879f 100644 --- a/components/driver/touch_sensor/esp32s3/include/driver/touch_sensor.h +++ b/components/driver/touch_sensor/esp32s3/include/driver/touch_sensor.h @@ -62,7 +62,7 @@ esp_err_t touch_pad_get_charge_discharge_times(uint16_t *charge_discharge_times) /** * @brief Set the interval between two measurements - * @note The touch sensor will sleep between two mesurements + * @note The touch sensor will sleep between two measurements * This function is to set the interval cycle * And the interval is clocked from SOC_MOD_CLK_RTC_SLOW, its default frequency is SOC_CLK_RC_SLOW_FREQ_APPROX * diff --git a/components/esp_adc/Kconfig b/components/esp_adc/Kconfig index c7b020805f..0bdf4dd73e 100644 --- a/components/esp_adc/Kconfig +++ b/components/esp_adc/Kconfig @@ -81,7 +81,7 @@ menu "ADC and ADC Calibration" bool "Enable ADC debug log" default n help - Wether to enable the debug log message for ADC driver. + whether to enable the debug log message for ADC driver. Note that this option only controls the ADC driver log, will not affect other drivers. note: This cannot be used in the ADC legacy driver. diff --git a/components/esp_adc/adc_continuous.c b/components/esp_adc/adc_continuous.c index 9fecdf51be..6a13fb2911 100644 --- a/components/esp_adc/adc_continuous.c +++ b/components/esp_adc/adc_continuous.c @@ -86,7 +86,7 @@ static IRAM_ATTR bool adc_dma_intr(adc_continuous_ctx_t *adc_digi_ctx) uint8_t *old_data = xRingbufferReceiveUpToFromISR(adc_digi_ctx->ringbuf_hdl, &actual_size, adc_digi_ctx->ringbuf_size); /** * Replace by ringbuffer reset API when this API is ready. - * Now we do mannual reset. + * Now we do manual reset. * For old_data == NULL condition (equals to the future ringbuffer reset fail condition), we don't care this time data, * as this only happens when the ringbuffer size is small, new data will be filled in soon. */ diff --git a/components/esp_adc/adc_monitor.c b/components/esp_adc/adc_monitor.c index 8bdeeddd85..768b46fac5 100644 --- a/components/esp_adc/adc_monitor.c +++ b/components/esp_adc/adc_monitor.c @@ -191,7 +191,7 @@ esp_err_t adc_continuous_monitor_register_event_callbacks(adc_monitor_handle_t m { ESP_RETURN_ON_FALSE(monitor_handle && cbs, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer"); ESP_RETURN_ON_FALSE(monitor_handle->fsm == ADC_MONITOR_FSM_INIT, ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor should be in init state"); - ESP_RETURN_ON_FALSE(!(monitor_handle->cbs.on_over_high_thresh || monitor_handle->cbs.on_below_low_thresh), ESP_ERR_INVALID_STATE, MNTOR_TAG, "callbacks had beed registered"); + ESP_RETURN_ON_FALSE(!(monitor_handle->cbs.on_over_high_thresh || monitor_handle->cbs.on_below_low_thresh), ESP_ERR_INVALID_STATE, MNTOR_TAG, "callbacks had been registered"); #if CONFIG_IDF_TARGET_ESP32S2 ESP_RETURN_ON_FALSE(!(cbs->on_below_low_thresh && cbs->on_over_high_thresh), ESP_ERR_NOT_SUPPORTED, MNTOR_TAG, "ESP32S2 support only one threshold"); #endif diff --git a/components/esp_adc/deprecated/esp32c3/esp_adc_cal_legacy.c b/components/esp_adc/deprecated/esp32c3/esp_adc_cal_legacy.c index 74213defc9..02bc42564f 100644 --- a/components/esp_adc/deprecated/esp32c3/esp_adc_cal_legacy.c +++ b/components/esp_adc/deprecated/esp32c3/esp_adc_cal_legacy.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -34,10 +34,10 @@ static const int coeff_a_scaling = 65536; * For each item, first element is the Coefficient, second element is the Multiple. (Coefficient / Multiple) is the real coefficient. * * @note {0,0} stands for unused item - * @note In case of the overflow, these coeffcients are recorded as Absolute Value + * @note In case of the overflow, these coefficients are recorded as Absolute Value * @note For atten0 ~ 2, error = (K0 * X^0) + (K1 * X^1) + (K2 * X^2); For atten3, error = (K0 * X^0) + (K1 * X^1) + (K2 * X^2) + (K3 * X^3) + (K4 * X^4); * @note Above formula is rewritten from the original documentation, please note that the coefficients are re-ordered. - * @note ADC1 and ADC2 use same coeffients + * @note ADC1 and ADC2 use same coefficients */ const static uint64_t adc_error_coef_atten[4][5][2] = { {{225966470500043, 1e15}, {7265418501948, 1e16}, {109410402681, 1e16}, {0, 0}, {0, 0}}, //atten0 @@ -47,7 +47,7 @@ const static uint64_t adc_error_coef_atten[4][5][2] = { }; /** * Term sign - * @note ADC1 and ADC2 use same coeffients + * @note ADC1 and ADC2 use same coefficients */ const static int32_t adc_error_sign[4][5] = { {-1, -1, 1, 0, 0}, //atten0 @@ -130,7 +130,7 @@ esp_adc_cal_value_t esp_adc_cal_characterize(adc_unit_t adc_num, adc_calib_parsed_info_t efuse_parsed_data = {0}; // Check parameters ESP_RETURN_ON_FALSE(adc_num == ADC_UNIT_1 || adc_num == ADC_UNIT_2, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid unit num"); - ESP_RETURN_ON_FALSE(chars != NULL, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Ivalid characteristic"); + ESP_RETURN_ON_FALSE(chars != NULL, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid characteristic"); ESP_RETURN_ON_FALSE(bit_width == ADC_WIDTH_BIT_12, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid bit_width"); ESP_RETURN_ON_FALSE(atten < SOC_ADC_ATTEN_NUM, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid attenuation"); diff --git a/components/esp_adc/deprecated/esp32s3/esp_adc_cal_legacy.c b/components/esp_adc/deprecated/esp32s3/esp_adc_cal_legacy.c index a37cf01655..53d99acb40 100644 --- a/components/esp_adc/deprecated/esp32s3/esp_adc_cal_legacy.c +++ b/components/esp_adc/deprecated/esp32s3/esp_adc_cal_legacy.c @@ -34,7 +34,7 @@ static const int coeff_a_scaling = 1000000; * For each item, first element is the Coefficient, second element is the Multiple. (Coefficient / Multiple) is the real coefficient. * * @note {0,0} stands for unused item - * @note In case of the overflow, these coeffcients are recorded as Absolute Value + * @note In case of the overflow, these coefficients are recorded as Absolute Value * @note For atten0 ~ 2, error = (K0 * X^0) + (K1 * X^1) + (K2 * X^2); For atten3, error = (K0 * X^0) + (K1 * X^1) + (K2 * X^2) + (K3 * X^3) + (K4 * X^4); * @note Above formula is rewritten from the original documentation, please note that the coefficients are re-ordered. */ @@ -133,7 +133,7 @@ esp_adc_cal_value_t esp_adc_cal_characterize(adc_unit_t adc_num, // Check parameters ESP_RETURN_ON_FALSE(adc_num == ADC_UNIT_1 || adc_num == ADC_UNIT_2, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid unit num"); - ESP_RETURN_ON_FALSE(chars != NULL, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Ivalid characteristic"); + ESP_RETURN_ON_FALSE(chars != NULL, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid characteristic"); ESP_RETURN_ON_FALSE(atten < SOC_ADC_ATTEN_NUM, ESP_ADC_CAL_VAL_NOT_SUPPORTED, LOG_TAG, "Invalid attenuation"); int version_num = esp_efuse_rtc_calib_get_ver(); diff --git a/components/esp_adc/esp32c2/adc_cali_line_fitting.c b/components/esp_adc/esp32c2/adc_cali_line_fitting.c index c5a7b263cd..9601f2e041 100644 --- a/components/esp_adc/esp32c2/adc_cali_line_fitting.c +++ b/components/esp_adc/esp32c2/adc_cali_line_fitting.c @@ -25,7 +25,7 @@ * 1. Rename this file to `adc_cali_line_fitting_v2.c`, as the Line Fitting Scheme on ESP32 and ESP32S2 are different to this. * 2. Move this file to common directory * 3. Still support `ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED` - * 4. Add a new internal maccro `ADC_CALI_SCHEME_LINE_FITTING_V2_SUPPORTED` + * 4. Add a new internal macro `ADC_CALI_SCHEME_LINE_FITTING_V2_SUPPORTED` * 5. Only build this file, when `ADC_CALI_SCHEME_LINE_FITTING_V2_SUPPORTED == true` */ diff --git a/components/esp_adc/include/esp_adc/adc_continuous.h b/components/esp_adc/include/esp_adc/adc_continuous.h index 99b2b269d5..422e46e4db 100644 --- a/components/esp_adc/include/esp_adc/adc_continuous.h +++ b/components/esp_adc/include/esp_adc/adc_continuous.h @@ -103,7 +103,7 @@ typedef struct { /** * @brief Initialize ADC continuous driver and get a handle to it * - * @param[in] hdl_config Pointer to ADC initilization config. Refer to ``adc_continuous_handle_cfg_t``. + * @param[in] hdl_config Pointer to ADC initialization config. Refer to ``adc_continuous_handle_cfg_t``. * @param[out] ret_handle ADC continuous mode driver handle * * @return diff --git a/components/esp_adc/test_apps/adc/main/test_adc.c b/components/esp_adc/test_apps/adc/main/test_adc.c index d1d2789e4c..19d1c836b0 100644 --- a/components/esp_adc/test_apps/adc/main/test_adc.c +++ b/components/esp_adc/test_apps/adc/main/test_adc.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -303,9 +303,9 @@ TEST_CASE("test ADC2 Single Read with Light Sleep", "[adc]") #if SOC_ADC_MONITOR_SUPPORTED && CONFIG_SOC_ADC_DMA_SUPPORTED #if CONFIG_IDF_TARGET_ESP32S2 -#define TEST_ADC_FORMATE_TYPE ADC_DIGI_OUTPUT_FORMAT_TYPE1 +#define TEST_ADC_FORMAT_TYPE ADC_DIGI_OUTPUT_FORMAT_TYPE1 #else -#define TEST_ADC_FORMATE_TYPE ADC_DIGI_OUTPUT_FORMAT_TYPE2 +#define TEST_ADC_FORMAT_TYPE ADC_DIGI_OUTPUT_FORMAT_TYPE2 #endif bool IRAM_ATTR test_high_cb(adc_monitor_handle_t monitor_handle, const adc_monitor_evt_data_t *event_data, void *user_data) { @@ -332,7 +332,7 @@ TEST_CASE("ADC continuous monitor init_deinit", "[adc]") .adc_pattern = adc_pattern, .sample_freq_hz = SOC_ADC_SAMPLE_FREQ_THRES_LOW, .conv_mode = ADC_CONV_SINGLE_UNIT_1, - .format = TEST_ADC_FORMATE_TYPE, + .format = TEST_ADC_FORMAT_TYPE, }; TEST_ESP_OK(adc_continuous_config(handle, &dig_cfg)); @@ -450,7 +450,7 @@ TEST_CASE("ADC continuous monitor functionary", "[adc][manual][ignore]") .adc_pattern = adc_pattern, .sample_freq_hz = SOC_ADC_SAMPLE_FREQ_THRES_LOW, .conv_mode = ADC_CONV_SINGLE_UNIT_1, - .format = TEST_ADC_FORMATE_TYPE, + .format = TEST_ADC_FORMAT_TYPE, }; TEST_ESP_OK(adc_continuous_config(handle, &dig_cfg)); diff --git a/components/esp_adc/test_apps/adc/main/test_adc_driver.c b/components/esp_adc/test_apps/adc/main/test_adc_driver.c index f84b7f0dc1..6937e5e388 100644 --- a/components/esp_adc/test_apps/adc/main/test_adc_driver.c +++ b/components/esp_adc/test_apps/adc/main/test_adc_driver.c @@ -47,7 +47,7 @@ static bool IRAM_ATTR s_alarm_callback(gptimer_handle_t timer, const gptimer_ala /** * This test won't disable the cache, so having some code on Flash is OK. - * If you copy this test callback with cache disabled, do remeber to put all code in internal RAM. + * If you copy this test callback with cache disabled, do remember to put all code in internal RAM. */ esp_rom_printf("alarm isr count=%llu\r\n", edata->count_value); @@ -213,7 +213,7 @@ TEST_CASE("ADC continuous big conv_frame_size test", "[adc_continuous]") #define ADC_FLUSH_TEST_SIZE 64 -TEST_CASE("ADC continuous flush internal pool", "[adc_continuous][mannual][ignore]") +TEST_CASE("ADC continuous flush internal pool", "[adc_continuous][manual][ignore]") { adc_continuous_handle_t handle = NULL; adc_continuous_handle_cfg_t adc_config = { diff --git a/components/esp_driver_ana_cmpr/Kconfig b/components/esp_driver_ana_cmpr/Kconfig index 98a8c96e55..e162aa4840 100644 --- a/components/esp_driver_ana_cmpr/Kconfig +++ b/components/esp_driver_ana_cmpr/Kconfig @@ -19,6 +19,6 @@ menu "ESP-Driver:Analog Comparator Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for Analog Comparator driver. + whether to enable the debug log message for Analog Comparator driver. Note that, this option only controls the Analog Comparator driver log, won't affect other drivers. endmenu # Analog Comparator Configuration diff --git a/components/esp_driver_ana_cmpr/include/driver/ana_cmpr.h b/components/esp_driver_ana_cmpr/include/driver/ana_cmpr.h index 0fbb083927..a02a3b2000 100644 --- a/components/esp_driver_ana_cmpr/include/driver/ana_cmpr.h +++ b/components/esp_driver_ana_cmpr/include/driver/ana_cmpr.h @@ -31,7 +31,7 @@ typedef struct { int intr_priority; /*!< The interrupt priority, range 0~7, if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) * otherwise the larger the higher, 7 is NMI */ struct { - uint32_t io_loop_back: 1; /*!< Enable this field when the other signals that output on the comparision pins are supposed to be fed back. + uint32_t io_loop_back: 1; /*!< Enable this field when the other signals that output on the comparison pins are supposed to be fed back. * Normally used for debug/test scenario */ } flags; /*!< Analog comparator driver flags */ } ana_cmpr_config_t; diff --git a/components/esp_driver_cam/csi/include/esp_cam_ctlr_csi.h b/components/esp_driver_cam/csi/include/esp_cam_ctlr_csi.h index 9e167547d2..02198f4241 100644 --- a/components/esp_driver_cam/csi/include/esp_cam_ctlr_csi.h +++ b/components/esp_driver_cam/csi/include/esp_cam_ctlr_csi.h @@ -33,7 +33,7 @@ typedef struct { mipi_csi_color_t input_data_color_type; ///< Input color type mipi_csi_color_t output_data_color_type; ///< Output color type bool byte_swap_en; ///< Enable byte swap - int queue_items; ///< Queue itmes + int queue_items; ///< Queue items } esp_cam_ctlr_csi_config_t; /** diff --git a/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c b/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c index b5fb13a285..e5c686fa65 100644 --- a/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c +++ b/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c @@ -186,7 +186,7 @@ esp_err_t esp_cam_new_csi_ctlr(const esp_cam_ctlr_csi_config_t *config, esp_cam_ .flow_controller = DW_GDMA_FLOW_CTRL_SRC, .chan_priority = 1, }; - ESP_GOTO_ON_ERROR(dw_gdma_new_channel(&csi_dma_alloc_config, &csi_dma_chan), err, TAG, "failed to new dwgdma channle"); + ESP_GOTO_ON_ERROR(dw_gdma_new_channel(&csi_dma_alloc_config, &csi_dma_chan), err, TAG, "failed to new dwgdma channel"); ctlr->dma_chan = csi_dma_chan; size_t csi_transfer_size = ctlr->h_res * ctlr->v_res * ctlr->in_bpp / 64; diff --git a/components/esp_driver_dac/Kconfig b/components/esp_driver_dac/Kconfig index a0c9c30c1d..e0a1546db5 100644 --- a/components/esp_driver_dac/Kconfig +++ b/components/esp_driver_dac/Kconfig @@ -19,7 +19,7 @@ menu "ESP-Driver:DAC Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy DAC driver (driver/dac.h). + whether to suppress the deprecation warnings when using legacy DAC driver (driver/dac.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -27,7 +27,7 @@ menu "ESP-Driver:DAC Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for DAC driver. + whether to enable the debug log message for DAC driver. Note that, this option only controls the DAC driver log, won't affect other drivers. config DAC_DMA_AUTO_16BIT_ALIGN diff --git a/components/esp_driver_dac/include/driver/dac_types.h b/components/esp_driver_dac/include/driver/dac_types.h index bc54334f46..05dee25f07 100644 --- a/components/esp_driver_dac/include/driver/dac_types.h +++ b/components/esp_driver_dac/include/driver/dac_types.h @@ -38,7 +38,7 @@ typedef enum { } dac_continuous_channel_mode_t; /** - * @brief DAC DMA (digitial controller) clock source + * @brief DAC DMA (digital controller) clock source * */ typedef soc_periph_dac_digi_clk_src_t dac_continuous_digi_clk_src_t; diff --git a/components/esp_driver_dac/test_apps/dac/main/test_dac.c b/components/esp_driver_dac/test_apps/dac/main/test_dac.c index 79b6e08066..5d49d73418 100644 --- a/components/esp_driver_dac/test_apps/dac/main/test_dac.c +++ b/components/esp_driver_dac/test_apps/dac/main/test_dac.c @@ -231,7 +231,7 @@ TEST_CASE("DAC_dma_write_test", "[dac]") * The frequency test is currently only supported on ESP32 * because there is no such signal to monitor on ESP32-S2 */ #if CONFIG_IDF_TARGET_ESP32 -TEST_CASE("DAC_dma_conver_frequency_test", "[dac]") +TEST_CASE("DAC_dma_convert_frequency_test", "[dac]") { /* Prepare configuration for the PCNT unit */ pcnt_unit_handle_t pcnt_unit = NULL; diff --git a/components/esp_driver_gpio/include/driver/gpio.h b/components/esp_driver_gpio/include/driver/gpio.h index ce2e14bf0f..70307f7116 100644 --- a/components/esp_driver_gpio/include/driver/gpio.h +++ b/components/esp_driver_gpio/include/driver/gpio.h @@ -399,7 +399,7 @@ esp_err_t gpio_hold_en(gpio_num_t gpio_num); * e.g. * If you hold gpio18 high during Deep-sleep, after the chip is woken up and `gpio_hold_dis` is called, * gpio18 will output low level(because gpio18 is input mode by default). If you don't want this behavior, - * you should configure gpio18 as output mode and set it to hight level before calling `gpio_hold_dis`. + * you should configure gpio18 as output mode and set it to high level before calling `gpio_hold_dis`. * * @param gpio_num GPIO number, only support output-capable GPIOs * @@ -442,9 +442,9 @@ void gpio_iomux_in(uint32_t gpio_num, uint32_t signal_idx); * @param gpio_num gpio_num GPIO number of the pad. * @param func The function number of the peripheral pin to output pin. * One of the ``FUNC_X_*`` of specified pin (X) in ``soc/io_mux_reg.h``. - * @param oen_inv True if the output enable needs to be inverted, otherwise False. + * @param out_en_inv True if the output enable needs to be inverted, otherwise False. */ -void gpio_iomux_out(uint8_t gpio_num, int func, bool oen_inv); +void gpio_iomux_out(uint8_t gpio_num, int func, bool out_en_inv); #if SOC_GPIO_SUPPORT_FORCE_HOLD /** diff --git a/components/esp_driver_gpio/include/driver/lp_io.h b/components/esp_driver_gpio/include/driver/lp_io.h index a19c2fff4e..01673d8bae 100644 --- a/components/esp_driver_gpio/include/driver/lp_io.h +++ b/components/esp_driver_gpio/include/driver/lp_io.h @@ -38,12 +38,12 @@ esp_err_t lp_gpio_connect_in_signal(gpio_num_t gpio_num, uint32_t signal_idx, bo * @param gpio_num GPIO number * @param signal_idx LP peripheral signal index (tagged as input attribute), especially, `SIG_LP_GPIO_OUT_IDX` means disconnect RTC(LP) GPIO and other peripherals. Only the RTC GPIO driver can control the output level * @param out_inv Whether to signal to be inverted or not - * @param oen_inv Whether the output enable control is inverted or not + * @param out_en_inv Whether the output enable control is inverted or not * @return * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t lp_gpio_connect_out_signal(gpio_num_t gpio_num, uint32_t signal_idx, bool out_inv, bool oen_inv); +esp_err_t lp_gpio_connect_out_signal(gpio_num_t gpio_num, uint32_t signal_idx, bool out_inv, bool out_en_inv); #endif // SOC_LP_GPIO_MATRIX_SUPPORTED #ifdef __cplusplus diff --git a/components/esp_driver_gpio/src/dedic_gpio.c b/components/esp_driver_gpio/src/dedic_gpio.c index 077efff88e..056c97fc68 100644 --- a/components/esp_driver_gpio/src/dedic_gpio.c +++ b/components/esp_driver_gpio/src/dedic_gpio.c @@ -75,7 +75,7 @@ static esp_err_t dedic_gpio_build_platform(int core_id) if (!s_platform[core_id]) { s_platform[core_id] = calloc(1, sizeof(dedic_gpio_platform_t)); if (s_platform[core_id]) { - // initialize platfrom members + // initialize platform members s_platform[core_id]->spinlock = (portMUX_TYPE)portMUX_INITIALIZER_UNLOCKED; // initial occupy_mask: 1111...100...0 s_platform[core_id]->out_occupied_mask = UINT32_MAX & ~((1 << SOC_DEDIC_GPIO_OUT_CHANNELS_NUM) - 1); diff --git a/components/esp_driver_gpio/src/gpio.c b/components/esp_driver_gpio/src/gpio.c index 667cf4aa27..d52dcde297 100644 --- a/components/esp_driver_gpio/src/gpio.c +++ b/components/esp_driver_gpio/src/gpio.c @@ -98,7 +98,7 @@ esp_err_t gpio_pullup_en(gpio_num_t gpio_num) #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED rtc_gpio_pullup_en(gpio_num); #else - abort(); // This should be eliminated as unreachable, unless a programming error has occured + abort(); // This should be eliminated as unreachable, unless a programming error has occurred #endif } @@ -117,7 +117,7 @@ esp_err_t gpio_pullup_dis(gpio_num_t gpio_num) #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED rtc_gpio_pullup_dis(gpio_num); #else - abort(); // This should be eliminated as unreachable, unless a programming error has occured + abort(); // This should be eliminated as unreachable, unless a programming error has occurred #endif } @@ -136,7 +136,7 @@ esp_err_t gpio_pulldown_en(gpio_num_t gpio_num) #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED rtc_gpio_pulldown_en(gpio_num); #else - abort(); // This should be eliminated as unreachable, unless a programming error has occured + abort(); // This should be eliminated as unreachable, unless a programming error has occurred #endif } @@ -155,7 +155,7 @@ esp_err_t gpio_pulldown_dis(gpio_num_t gpio_num) #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED rtc_gpio_pulldown_dis(gpio_num); #else - abort(); // This should be eliminated as unreachable, unless a programming error has occured + abort(); // This should be eliminated as unreachable, unless a programming error has occurred #endif } @@ -689,7 +689,7 @@ esp_err_t gpio_set_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t streng #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED ret = rtc_gpio_set_drive_capability(gpio_num, strength); #else - abort(); // This should be eliminated as unreachable, unless a programming error has occured + abort(); // This should be eliminated as unreachable, unless a programming error has occurred #endif } @@ -710,7 +710,7 @@ esp_err_t gpio_get_drive_capability(gpio_num_t gpio_num, gpio_drive_cap_t *stren #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED ret = rtc_gpio_get_drive_capability(gpio_num, strength); #else - abort(); // This should be eliminated as unreachable, unless a programming error has occured + abort(); // This should be eliminated as unreachable, unless a programming error has occurred #endif } @@ -802,9 +802,9 @@ void gpio_iomux_in(uint32_t gpio, uint32_t signal_idx) gpio_hal_iomux_in(gpio_context.gpio_hal, gpio, signal_idx); } -void gpio_iomux_out(uint8_t gpio_num, int func, bool oen_inv) +void gpio_iomux_out(uint8_t gpio_num, int func, bool out_en_inv) { - gpio_hal_iomux_out(gpio_context.gpio_hal, gpio_num, func, (uint32_t)oen_inv); + gpio_hal_iomux_out(gpio_context.gpio_hal, gpio_num, func, (uint32_t)out_en_inv); } static esp_err_t gpio_sleep_pullup_en(gpio_num_t gpio_num) diff --git a/components/esp_driver_gpio/src/rtc_io.c b/components/esp_driver_gpio/src/rtc_io.c index 62d5269d97..9a582b1867 100644 --- a/components/esp_driver_gpio/src/rtc_io.c +++ b/components/esp_driver_gpio/src/rtc_io.c @@ -194,10 +194,10 @@ esp_err_t lp_gpio_connect_in_signal(gpio_num_t gpio_num, uint32_t signal_idx, bo return ESP_OK; } -esp_err_t lp_gpio_connect_out_signal(gpio_num_t gpio_num, uint32_t signal_idx, bool out_inv, bool oen_inv) +esp_err_t lp_gpio_connect_out_signal(gpio_num_t gpio_num, uint32_t signal_idx, bool out_inv, bool out_en_inv) { ESP_RETURN_ON_FALSE(rtc_gpio_is_valid_gpio(gpio_num), ESP_ERR_INVALID_ARG, RTCIO_TAG, "LP_IO number error"); - rtcio_hal_matrix_out(rtc_io_number_get(gpio_num), signal_idx, out_inv, oen_inv); + rtcio_hal_matrix_out(rtc_io_number_get(gpio_num), signal_idx, out_inv, out_en_inv); return ESP_OK; } #endif // SOC_LP_GPIO_MATRIX_SUPPORTED diff --git a/components/esp_driver_gpio/test_apps/gpio_extensions/main/test_hysteresis.c b/components/esp_driver_gpio/test_apps/gpio_extensions/main/test_hysteresis.c index bd4eb69c16..8d58211bd8 100644 --- a/components/esp_driver_gpio/test_apps/gpio_extensions/main/test_hysteresis.c +++ b/components/esp_driver_gpio/test_apps/gpio_extensions/main/test_hysteresis.c @@ -11,7 +11,7 @@ /** * NOTE: To run this special feature test case, a slope analog signal is needed. - * A simple RC circuit used here to formate pin switches to continuos slop signal. + * A simple RC circuit used here to generate continuous slope signal. * * +---------+ * | | diff --git a/components/esp_driver_gptimer/Kconfig b/components/esp_driver_gptimer/Kconfig index 84f5421257..cac9d11b17 100644 --- a/components/esp_driver_gptimer/Kconfig +++ b/components/esp_driver_gptimer/Kconfig @@ -26,6 +26,6 @@ menu "ESP-Driver:GPTimer Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for GPTimer driver. + whether to enable the debug log message for GPTimer driver. Note that, this option only controls the GPTimer driver log, won't affect other drivers. endmenu diff --git a/components/esp_driver_i2c/Kconfig b/components/esp_driver_i2c/Kconfig index db3b45814b..d8156fddf3 100644 --- a/components/esp_driver_i2c/Kconfig +++ b/components/esp_driver_i2c/Kconfig @@ -12,7 +12,7 @@ menu "ESP-Driver:I2C Configurations" bool "Enable I2C debug log" default n help - Wether to enable the debug log message for I2C driver. + whether to enable the debug log message for I2C driver. Note that this option only controls the I2C driver log, will not affect other drivers. note: This cannot be used in the I2C legacy driver. diff --git a/components/esp_driver_i2c/i2c_common.c b/components/esp_driver_i2c/i2c_common.c index 33beb3dee1..671b40573e 100644 --- a/components/esp_driver_i2c/i2c_common.c +++ b/components/esp_driver_i2c/i2c_common.c @@ -41,7 +41,7 @@ typedef struct i2c_platform_t { static i2c_platform_t s_i2c_platform = {}; // singleton platform -static esp_err_t s_i2c_bus_handle_aquire(i2c_port_num_t port_num, i2c_bus_handle_t *i2c_new_bus, i2c_bus_mode_t mode) +static esp_err_t s_i2c_bus_handle_acquire(i2c_port_num_t port_num, i2c_bus_handle_t *i2c_new_bus, i2c_bus_mode_t mode) { #if CONFIG_I2C_ENABLE_DEBUG_LOG esp_log_level_set(TAG, ESP_LOG_DEBUG); @@ -104,7 +104,7 @@ esp_err_t i2c_acquire_bus_handle(i2c_port_num_t port_num, i2c_bus_handle_t *i2c_ for (int i = 0; i < SOC_I2C_NUM; i++) { bus_occupied = i2c_bus_occupied(i); if (bus_occupied == false) { - ret = s_i2c_bus_handle_aquire(i, i2c_new_bus, mode); + ret = s_i2c_bus_handle_acquire(i, i2c_new_bus, mode); if (ret != ESP_OK) { ESP_LOGE(TAG, "acquire bus failed"); _lock_release(&s_i2c_platform.mutex); @@ -117,7 +117,7 @@ esp_err_t i2c_acquire_bus_handle(i2c_port_num_t port_num, i2c_bus_handle_t *i2c_ } ESP_RETURN_ON_FALSE((bus_found == true), ESP_ERR_NOT_FOUND, TAG, "acquire bus failed, no free bus"); } else { - ret = s_i2c_bus_handle_aquire(port_num, i2c_new_bus, mode); + ret = s_i2c_bus_handle_acquire(port_num, i2c_new_bus, mode); if (ret != ESP_OK) { ESP_LOGE(TAG, "acquire bus failed"); } diff --git a/components/esp_driver_i2c/i2c_master.c b/components/esp_driver_i2c/i2c_master.c index ac88076b0b..ea2d4e614b 100644 --- a/components/esp_driver_i2c/i2c_master.c +++ b/components/esp_driver_i2c/i2c_master.c @@ -119,7 +119,7 @@ static esp_err_t s_i2c_hw_fsm_reset(i2c_master_bus_handle_t i2c_master) * * @param[in] i2c_master I2C master handle * @param[in] i2c_operation Pointer to I2C trans operation structure. - * @param[in] fifo_fill will be populated with the number of bytes written to the harware FIFO by this function + * @param[in] fifo_fill will be populated with the number of bytes written to the hardware FIFO by this function * @param[in] address_fill I2C device address with read or write information. */ static bool s_i2c_write_command(i2c_master_bus_handle_t i2c_master, i2c_operation_t *i2c_operation, uint8_t *fifo_fill, uint8_t *address_fill, BaseType_t *do_yield) diff --git a/components/esp_driver_i2c/i2c_private.h b/components/esp_driver_i2c/i2c_private.h index b489a984ed..58a07b376c 100644 --- a/components/esp_driver_i2c/i2c_private.h +++ b/components/esp_driver_i2c/i2c_private.h @@ -108,7 +108,7 @@ struct i2c_bus_t { int scl_num; // SCL pin number bool pull_up_enable; // Enable pull-ups intr_handle_t intr_handle; // I2C interrupt handle - esp_pm_lock_handle_t pm_lock; // power manange lock + esp_pm_lock_handle_t pm_lock; // power manage lock #if CONFIG_PM_ENABLE char pm_lock_name[I2C_PM_LOCK_NAME_LEN_MAX]; // pm lock name #endif @@ -141,7 +141,7 @@ struct i2c_master_bus_t { bool ack_check_disable; // Disable ACK check volatile bool trans_done; // transaction command finish SLIST_HEAD(i2c_master_device_list_head, i2c_master_device_list) device_list; // I2C device (instance) list - // asnyc trans members + // async trans members bool async_break; // break transaction loop flag. i2c_addr_bit_len_t addr_10bits_bus; // Slave address is 10 bits. size_t queue_size; // I2C transaction queue size. diff --git a/components/esp_driver_i2c/i2c_slave.c b/components/esp_driver_i2c/i2c_slave.c index 5fd9ae9738..99d821c286 100644 --- a/components/esp_driver_i2c/i2c_slave.c +++ b/components/esp_driver_i2c/i2c_slave.c @@ -320,7 +320,7 @@ esp_err_t i2c_slave_transmit(i2c_slave_dev_handle_t i2c_slave, const uint8_t *da { ESP_RETURN_ON_FALSE(i2c_slave, ESP_ERR_INVALID_ARG, TAG, "i2c slave not initialized"); ESP_RETURN_ON_FALSE(data, ESP_ERR_INVALID_ARG, TAG, "invalid data buffer"); - ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_FIFO), ESP_ERR_NOT_SUPPORTED, TAG, "non-fifo mode is not suppored in this API, please set access_ram_en to false"); + ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_FIFO), ESP_ERR_NOT_SUPPORTED, TAG, "non-fifo mode is not supported in this API, please set access_ram_en to false"); esp_err_t ret = ESP_OK; i2c_hal_context_t *hal = &i2c_slave->base->hal; TickType_t wait_ticks = (xfer_timeout_ms == -1) ? portMAX_DELAY : pdMS_TO_TICKS(xfer_timeout_ms); @@ -340,7 +340,7 @@ esp_err_t i2c_slave_receive(i2c_slave_dev_handle_t i2c_slave, uint8_t *data, siz { ESP_RETURN_ON_FALSE(i2c_slave, ESP_ERR_INVALID_ARG, TAG, "i2c slave not initialized"); ESP_RETURN_ON_FALSE(data, ESP_ERR_INVALID_ARG, TAG, "invalid data buffer"); - ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_FIFO), ESP_ERR_NOT_SUPPORTED, TAG, "non-fifo mode is not suppored in this API, please set access_ram_en to false"); + ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_FIFO), ESP_ERR_NOT_SUPPORTED, TAG, "non-fifo mode is not supported in this API, please set access_ram_en to false"); #if CONFIG_I2C_ISR_IRAM_SAFE ESP_RETURN_ON_FALSE(esp_ptr_internal(data), ESP_ERR_INVALID_ARG, TAG, "buffer must locate in internal RAM if IRAM_SAFE is enabled"); #endif @@ -365,7 +365,7 @@ esp_err_t i2c_slave_read_ram(i2c_slave_dev_handle_t i2c_slave, uint8_t ram_offse ESP_RETURN_ON_FALSE(i2c_slave, ESP_ERR_INVALID_ARG, TAG, "i2c slave not initialized"); ESP_RETURN_ON_FALSE(data, ESP_ERR_INVALID_ARG, TAG, "invalid data buffer"); ESP_RETURN_ON_FALSE((ram_offset + receive_size <= SOC_I2C_FIFO_LEN), ESP_ERR_INVALID_SIZE, TAG, "don't read data cross fifo boundary, see `SOC_I2C_FIFO_LEN`"); - ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_NONFIFO), ESP_ERR_NOT_SUPPORTED, TAG, "fifo mode is not suppored in this API, please set access_ram_en to true"); + ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_NONFIFO), ESP_ERR_NOT_SUPPORTED, TAG, "fifo mode is not supported in this API, please set access_ram_en to true"); i2c_hal_context_t *hal = &i2c_slave->base->hal; uint32_t fifo_size = 0; @@ -386,7 +386,7 @@ esp_err_t i2c_slave_write_ram(i2c_slave_dev_handle_t i2c_slave, uint8_t ram_offs { ESP_RETURN_ON_FALSE(i2c_slave, ESP_ERR_INVALID_ARG, TAG, "i2c slave not initialized"); ESP_RETURN_ON_FALSE(data, ESP_ERR_INVALID_ARG, TAG, "invalid data buffer"); - ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_NONFIFO), ESP_ERR_NOT_SUPPORTED, TAG, "fifo mode is not suppored in this API, please set access_ram_en to true"); + ESP_RETURN_ON_FALSE((i2c_slave->fifo_mode == I2C_SLAVE_NONFIFO), ESP_ERR_NOT_SUPPORTED, TAG, "fifo mode is not supported in this API, please set access_ram_en to true"); i2c_hal_context_t *hal = &i2c_slave->base->hal; ESP_RETURN_ON_FALSE(xSemaphoreTake(i2c_slave->slv_tx_mux, portMAX_DELAY) == pdTRUE, ESP_ERR_TIMEOUT, TAG, "write to ram lock timeout"); diff --git a/components/esp_driver_i2c/include/driver/i2c_master.h b/components/esp_driver_i2c/include/driver/i2c_master.h index 066cf872fa..0375f2283d 100644 --- a/components/esp_driver_i2c/include/driver/i2c_master.h +++ b/components/esp_driver_i2c/include/driver/i2c_master.h @@ -40,7 +40,7 @@ typedef struct { uint32_t scl_speed_hz; /*!< I2C SCL line frequency. */ uint32_t scl_wait_us; /*!< Timeout value. (unit: us). Please note this value should not be so small that it can handle stretch/disturbance properly. If 0 is set, that means use the default reg value*/ struct { - uint32_t disable_ack_check: 1; /*!< Disable ACK check. If this is set false, that means ack check is enabled, the transaction will be stoped and API returns error when nack is detected. */ + uint32_t disable_ack_check: 1; /*!< Disable ACK check. If this is set false, that means ack check is enabled, the transaction will be stopped and API returns error when nack is detected. */ } flags; /*!< I2C device config flags */ } i2c_device_config_t; diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_common.c b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_common.c index 1aa749c82c..843f8de715 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_common.c +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_common.c @@ -181,7 +181,7 @@ static IRAM_ATTR bool test_master_tx_done_callback(i2c_master_dev_handle_t i2c_d * * 1. See the depth of queue is 37, but the number of transaction is 42, that means some * queue must be reused. - * 2. There are some delay randomly set there, for testing the concurency or any I2C state + * 2. There are some delay randomly set there, for testing the concurrency or any I2C state * might be met. ******************************************************************************* */ diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_multi.c b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_multi.c index ffd8a96a53..13004ef1ef 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_multi.c +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/main/test_i2c_multi.c @@ -614,7 +614,7 @@ static void slave_init_for_probe(void) TEST_CASE_MULTIPLE_DEVICES("I2C master probe slave test", "[i2c][test_env=generic_multi_device][timeout=150]", master_probe_slave, slave_init_for_probe); #if SOC_I2C_NUM > 1 -// Now chips with mutiple I2C controllers are up to 2, can change this to interation when we have more I2C controllers. +// Now chips with multiple I2C controllers are up to 2, can test more ports when we have more I2C controllers. static void i2c_master_write_test_more_port(void) { uint8_t data_wr[DATA_LENGTH] = { 0 }; diff --git a/components/esp_driver_i2s/Kconfig b/components/esp_driver_i2s/Kconfig index 09a2014e48..b3413eafb4 100644 --- a/components/esp_driver_i2s/Kconfig +++ b/components/esp_driver_i2s/Kconfig @@ -17,6 +17,6 @@ menu "ESP-Driver:I2S Configurations" bool "Enable I2S debug log" default n help - Wether to enable the debug log message for I2S driver. + whether to enable the debug log message for I2S driver. Note that, this option only controls the I2S driver log, will not affect other drivers. endmenu # I2S Configuration diff --git a/components/esp_driver_i2s/i2s_common.c b/components/esp_driver_i2s/i2s_common.c index 387e6a7728..fe7f13eff4 100644 --- a/components/esp_driver_i2s/i2s_common.c +++ b/components/esp_driver_i2s/i2s_common.c @@ -366,7 +366,7 @@ uint32_t i2s_get_buf_size(i2s_chan_handle_t handle, uint32_t data_bit_width, uin } } if (bufsize / bytes_per_frame != dma_frame_num) { - ESP_LOGW(TAG, "dma frame num is adjusted to %"PRIu32" to algin the dma buffer with %"PRIu32 + ESP_LOGW(TAG, "dma frame num is adjusted to %"PRIu32" to align the dma buffer with %"PRIu32 ", bufsize = %"PRIu32, bufsize / bytes_per_frame, alignment, bufsize); } #endif @@ -417,7 +417,7 @@ esp_err_t i2s_alloc_dma_desc(i2s_chan_handle_t handle, uint32_t num, uint32_t bu /* Descriptors must be in the internal RAM */ handle->dma.desc = (lldesc_t **)heap_caps_calloc(num, sizeof(lldesc_t *), I2S_MEM_ALLOC_CAPS); - ESP_GOTO_ON_FALSE(handle->dma.desc, ESP_ERR_NO_MEM, err, TAG, "create I2S DMA decriptor array failed"); + ESP_GOTO_ON_FALSE(handle->dma.desc, ESP_ERR_NO_MEM, err, TAG, "create I2S DMA descriptor array failed"); handle->dma.bufs = (uint8_t **)heap_caps_calloc(num, sizeof(uint8_t *), I2S_MEM_ALLOC_CAPS); size_t desc_size = 0; for (int i = 0; i < num; i++) { diff --git a/components/esp_driver_i2s/i2s_private.h b/components/esp_driver_i2s/i2s_private.h index 9a5877be0f..b1404822c0 100644 --- a/components/esp_driver_i2s/i2s_private.h +++ b/components/esp_driver_i2s/i2s_private.h @@ -134,7 +134,7 @@ struct i2s_channel_obj_t { int intr_prio_flags;/*!< i2s interrupt priority flags */ void *mode_info; /*!< Slot, clock and gpio information of each mode */ #if SOC_I2S_SUPPORTS_APLL - bool apll_en; /*!< Flag of wether APLL enabled */ + bool apll_en; /*!< Flag of whether APLL enabled */ #endif uint32_t active_slot; /*!< Active slot number */ uint32_t total_slot; /*!< Total slot number */ diff --git a/components/esp_driver_i2s/test_apps/i2s/main/test_i2s.c b/components/esp_driver_i2s/test_apps/i2s/main/test_i2s.c index eff30d9f1c..80bd26728b 100644 --- a/components/esp_driver_i2s/test_apps/i2s/main/test_i2s.c +++ b/components/esp_driver_i2s/test_apps/i2s/main/test_i2s.c @@ -349,7 +349,7 @@ TEST_CASE("I2S_thread_concurrent_safety_test", "[i2s]") xTaskCreate(i2s_read_task, "i2s_read_task", 4096, rx_handle, 5, NULL); /* writing task to keep writing */ xTaskCreate(i2s_write_task, "i2s_write_task", 4096, tx_handle, 5, NULL); - /* reconfig taks to reconfigurate the settings every 200 ms */ + /* reconfig task to reconfigure the settings every 200 ms */ xTaskCreate(i2s_reconfig_task, "i2s_reconfig_task", 4096, tx_handle, 6, NULL); /* Wait 3 seconds to see if any failures occur */ diff --git a/components/esp_driver_jpeg/Kconfig b/components/esp_driver_jpeg/Kconfig index 4b9e5d36e7..22b297cfec 100644 --- a/components/esp_driver_jpeg/Kconfig +++ b/components/esp_driver_jpeg/Kconfig @@ -5,7 +5,7 @@ menu "ESP-Driver:JPEG-Codec Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for JPEG driver. + whether to enable the debug log message for JPEG driver. Note that, this option only controls the JPEG driver log, won't affect other drivers. Please also note, enable this option will make jpeg codec process speed much slower. diff --git a/components/esp_driver_jpeg/include/driver/jpeg_decode.h b/components/esp_driver_jpeg/include/driver/jpeg_decode.h index 924a404ba5..4153a1d0b4 100644 --- a/components/esp_driver_jpeg/include/driver/jpeg_decode.h +++ b/components/esp_driver_jpeg/include/driver/jpeg_decode.h @@ -32,7 +32,7 @@ typedef struct { } jpeg_decode_engine_cfg_t; /** - * @brief Stucture for jpeg decode header + * @brief Structure for jpeg decode header */ typedef struct { uint32_t width; /*!< Number of pixels in the horizontal direction */ diff --git a/components/esp_driver_jpeg/jpeg_decode.c b/components/esp_driver_jpeg/jpeg_decode.c index c7794eb06e..76c4f00d54 100644 --- a/components/esp_driver_jpeg/jpeg_decode.c +++ b/components/esp_driver_jpeg/jpeg_decode.c @@ -95,7 +95,7 @@ esp_err_t jpeg_new_decoder_engine(const jpeg_decode_engine_cfg_t *dec_eng_cfg, j /// init jpeg interrupt. jpeg_ll_clear_intr_mask(hal->dev, JPEG_LL_DECODER_EVENT_INTR); - ESP_GOTO_ON_ERROR(jpeg_check_intr_priority(decoder_engine->codec_base, dec_eng_cfg->intr_priority), err, TAG, "set group intrrupt priority failed"); + ESP_GOTO_ON_ERROR(jpeg_check_intr_priority(decoder_engine->codec_base, dec_eng_cfg->intr_priority), err, TAG, "set group interrupt priority failed"); if (dec_eng_cfg->intr_priority) { ESP_RETURN_ON_FALSE(1 << (dec_eng_cfg->intr_priority) & JPEG_ALLOW_INTR_PRIORITY_MASK, ESP_ERR_INVALID_ARG, TAG, "invalid interrupt priority:%d", dec_eng_cfg->intr_priority); } @@ -159,7 +159,7 @@ esp_err_t jpeg_decoder_get_info(const uint8_t *in_buf, uint32_t inbuf_len, jpeg_ width = jpeg_get_bytes(header_info, 2); break; } - // This function only used for get width and hight. So only read SOF marker is enough. + // This function only used for get width and height. So only read SOF marker is enough. // Can be extended if picture information is extended. if (marker == JPEG_M_SOF0) { break; @@ -201,7 +201,7 @@ esp_err_t jpeg_decoder_process(jpeg_decoder_handle_t decoder_engine, const jpeg_ ESP_GOTO_ON_ERROR(jpeg_dec_config_dma_descriptor(decoder_engine), err, TAG, "config dma descriptor failed"); *out_size = decoder_engine->header_info->process_h * decoder_engine->header_info->process_v * decoder_engine->pixel; - ESP_GOTO_ON_FALSE((*out_size <= outbuf_size), ESP_ERR_INVALID_ARG, err, TAG, "Given buffer size % " PRId32 " is smaller than actual jpeg decode output size % " PRId32 "the hight and width of output picture size will be adjusted to 16 bytes aligned automatically", outbuf_size, *out_size); + ESP_GOTO_ON_FALSE((*out_size <= outbuf_size), ESP_ERR_INVALID_ARG, err, TAG, "Given buffer size % " PRId32 " is smaller than actual jpeg decode output size % " PRId32 "the height and width of output picture size will be adjusted to 16 bytes aligned automatically", outbuf_size, *out_size); dma2d_trans_config_t trans_desc = { .tx_channel_num = 1, @@ -682,7 +682,7 @@ static void s_decoder_error_log_print(uint32_t status) if (status & JPEG_LL_INTR_MARKER_ERR_OTHER) { ESP_LOGE(TAG, "there is an error in the non-first SCAN header information parsed by the decoder."); } - if (status & JPEG_LL_INTR_UNDET) { + if (status & JPEG_LL_INTR_UNDETECT) { ESP_LOGE(TAG, "the bitstream of a image is completely read from 2D DMA but the SOS marker is not read"); } if (status & JPEG_LL_INTR_DECODE_TIMEOUT) { diff --git a/components/esp_driver_jpeg/jpeg_private.h b/components/esp_driver_jpeg/jpeg_private.h index 6a18f4dda6..18754a8244 100644 --- a/components/esp_driver_jpeg/jpeg_private.h +++ b/components/esp_driver_jpeg/jpeg_private.h @@ -49,7 +49,7 @@ struct jpeg_codec_t { intr_handle_t intr_handle; // jpeg codec interrupt handler int intr_priority; // jpeg codec interrupt priority SLIST_HEAD(jpeg_isr_handler_list_, jpeg_isr_handler_) jpeg_isr_handler_list; // List for jpeg interrupt. - esp_pm_lock_handle_t pm_lock; // power manange lock + esp_pm_lock_handle_t pm_lock; // power manage lock }; typedef enum { diff --git a/components/esp_driver_ledc/include/driver/ledc.h b/components/esp_driver_ledc/include/driver/ledc.h index 2ce9877c79..593503c6f6 100644 --- a/components/esp_driver_ledc/include/driver/ledc.h +++ b/components/esp_driver_ledc/include/driver/ledc.h @@ -491,11 +491,11 @@ esp_err_t ledc_fade_start(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_f #if SOC_LEDC_SUPPORT_FADE_STOP /** - * @brief Stop LEDC fading. The duty of the channel is garanteed to be fixed at most one PWM cycle after the function returns. + * @brief Stop LEDC fading. The duty of the channel is guaranteed to be fixed at most one PWM cycle after the function returns. * * @note This API can be called if a new fixed duty or a new fade want to be set while the last fade operation is still running in progress. * @note Call this API will abort the fading operation only if it was started by calling ledc_fade_start with LEDC_FADE_NO_WAIT mode. - * @note If a fade was started with LEDC_FADE_WAIT_DONE mode, calling this API afterwards has no use in stopping the fade. Fade will continue until it reachs the target duty. + * @note If a fade was started with LEDC_FADE_WAIT_DONE mode, calling this API afterwards has no use in stopping the fade. Fade will continue until it reaches the target duty. * * @param speed_mode Select the LEDC channel group with specified speed mode. Note that not all targets support high speed mode. * @param channel LEDC channel number diff --git a/components/esp_driver_ledc/src/ledc.c b/components/esp_driver_ledc/src/ledc.c index 0ed8788625..ba58d61204 100644 --- a/components/esp_driver_ledc/src/ledc.c +++ b/components/esp_driver_ledc/src/ledc.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -35,7 +35,7 @@ static __attribute__((unused)) const char *LEDC_TAG = "ledc"; #define LEDC_SLOW_CLK_UNINIT -1 #define LEDC_TIMER_SPECIFIC_CLK_UNINIT -1 -// Precision degree only affects RC_FAST, other clock sources' frequences are fixed values +// Precision degree only affects RC_FAST, other clock sources' frequencies are fixed values // For targets that do not support RC_FAST calibration, can only use its approx. value. Precision degree other than // APPROX will trigger LOGW during the call to `esp_clk_tree_src_get_freq_hz`. #if SOC_CLK_RC_FAST_SUPPORT_CALIBRATION @@ -435,7 +435,7 @@ static uint32_t ledc_auto_clk_divisor(ledc_mode_t speed_mode, int freq_hz, uint3 uint32_t div_param_timer = ledc_auto_timer_specific_clk_divisor(speed_mode, freq_hz, precision, clk_source); if (div_param_timer != LEDC_CLK_NOT_FOUND) { - /* The dividor is valid, no need try any other clock, return directly. */ + /* The divider is valid, no need try any other clock, return directly. */ ret = div_param_timer; } #endif @@ -748,13 +748,13 @@ esp_err_t ledc_stop(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t idl } esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t duty, ledc_duty_direction_t fade_direction, - uint32_t step_num, uint32_t duty_cyle_num, uint32_t duty_scale) + uint32_t step_num, uint32_t duty_cycle_num, uint32_t duty_scale) { LEDC_ARG_CHECK(speed_mode < LEDC_SPEED_MODE_MAX, "speed_mode"); LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); LEDC_ARG_CHECK(fade_direction < LEDC_DUTY_DIR_MAX, "fade_direction"); LEDC_ARG_CHECK(step_num <= LEDC_LL_DUTY_NUM_MAX, "step_num"); - LEDC_ARG_CHECK(duty_cyle_num <= LEDC_LL_DUTY_CYCLE_MAX, "duty_cycle_num"); + LEDC_ARG_CHECK(duty_cycle_num <= LEDC_LL_DUTY_CYCLE_MAX, "duty_cycle_num"); LEDC_ARG_CHECK(duty_scale <= LEDC_LL_DUTY_SCALE_MAX, "duty_scale"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); _ledc_fade_hw_acquire(speed_mode, channel); @@ -765,7 +765,7 @@ esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t duty, //uint32_t duty_val, fade_direction, //uint32_t increase, step_num, //uint32_t duty_num, - duty_cyle_num, //uint32_t duty_cycle, + duty_cycle_num, //uint32_t duty_cycle, duty_scale //uint32_t duty_scale ); portEXIT_CRITICAL(&ledc_spinlock); @@ -1260,7 +1260,7 @@ esp_err_t ledc_fade_stop(ledc_mode_t speed_mode, ledc_channel_t channel) } portEXIT_CRITICAL(&ledc_spinlock); if (wait_for_idle) { - // Wait for ISR return, which gives the semaphore and switchs state to IDLE + // Wait for ISR return, which gives the semaphore and switches state to IDLE _ledc_fade_hw_acquire(speed_mode, channel); assert(fade->fsm == LEDC_FSM_IDLE); } diff --git a/components/esp_driver_ledc/test_apps/ledc/main/test_ledc.c b/components/esp_driver_ledc/test_apps/ledc/main/test_ledc.c index 1d3f7b6b80..fe9e591810 100644 --- a/components/esp_driver_ledc/test_apps/ledc/main/test_ledc.c +++ b/components/esp_driver_ledc/test_apps/ledc/main/test_ledc.c @@ -379,7 +379,7 @@ TEST_CASE("LEDC fade stop test", "[ledc]") // Get duty value right before stopping the fade uint32_t duty_before_stop = ledc_get_duty(test_speed_mode, LEDC_CHANNEL_0); TEST_ESP_OK(ledc_fade_stop(test_speed_mode, LEDC_CHANNEL_0)); - // PWM signal is 2000 Hz. It may take one cycle (500 us) at maximum to stablize the duty. + // PWM signal is 2000 Hz. It may take one cycle (500 us) at maximum to stabilize the duty. esp_rom_delay_us(500); // Get duty value now, which is at least one cycle after the ledc_fade_stop function returns uint32_t duty_after_stop = ledc_get_duty(test_speed_mode, LEDC_CHANNEL_0); @@ -508,7 +508,7 @@ static void tear_testbench(void) // use PCNT to test the waveform of LEDC static int wave_count(int last_time) { - // The input ability of PULSE_IO is disabled after ledc driver install, so we need to reenable it again + // The input ability of PULSE_IO is disabled after ledc driver install, so we need to re-enable it again PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[PULSE_IO]); int test_counter = 0; TEST_ESP_OK(pcnt_unit_clear_count(pcnt_unit)); diff --git a/components/esp_driver_mcpwm/Kconfig b/components/esp_driver_mcpwm/Kconfig index 2989a838d7..a029daca9e 100644 --- a/components/esp_driver_mcpwm/Kconfig +++ b/components/esp_driver_mcpwm/Kconfig @@ -20,6 +20,6 @@ menu "ESP-Driver:MCPWM Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for MCPWM driver. + whether to enable the debug log message for MCPWM driver. Note that, this option only controls the MCPWM driver log, won't affect other drivers. endmenu diff --git a/components/esp_driver_mcpwm/include/driver/mcpwm_oper.h b/components/esp_driver_mcpwm/include/driver/mcpwm_oper.h index 845d333b7b..c3cb0781f6 100644 --- a/components/esp_driver_mcpwm/include/driver/mcpwm_oper.h +++ b/components/esp_driver_mcpwm/include/driver/mcpwm_oper.h @@ -96,7 +96,7 @@ esp_err_t mcpwm_operator_set_brake_on_fault(mcpwm_oper_handle_t oper, const mcpw /** * @brief Try to make the operator recover from fault * - * @note To recover from fault or escape from trip, you make sure the fault signal has dissappeared already. + * @note To recover from fault or escape from trip, you make sure the fault signal has disappeared already. * Otherwise the recovery can't succeed. * * @param[in] oper MCPWM operator, allocated by `mcpwm_new_operator()` diff --git a/components/esp_driver_mcpwm/src/mcpwm_cap.c b/components/esp_driver_mcpwm/src/mcpwm_cap.c index d369530005..4a7778a34f 100644 --- a/components/esp_driver_mcpwm/src/mcpwm_cap.c +++ b/components/esp_driver_mcpwm/src/mcpwm_cap.c @@ -277,7 +277,7 @@ esp_err_t mcpwm_new_capture_channel(mcpwm_cap_timer_handle_t cap_timer, const mc // if interrupt priority specified before, it cannot be changed until the group is released // check if the new priority specified consistents with the old one - ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group intrrupt priority failed"); + ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group interrupt priority failed"); mcpwm_ll_capture_enable_negedge(hal->dev, cap_chan_id, config->flags.neg_edge); mcpwm_ll_capture_enable_posedge(hal->dev, cap_chan_id, config->flags.pos_edge); diff --git a/components/esp_driver_mcpwm/src/mcpwm_fault.c b/components/esp_driver_mcpwm/src/mcpwm_fault.c index 5961b1eec8..b2539e2048 100644 --- a/components/esp_driver_mcpwm/src/mcpwm_fault.c +++ b/components/esp_driver_mcpwm/src/mcpwm_fault.c @@ -109,7 +109,7 @@ esp_err_t mcpwm_new_gpio_fault(const mcpwm_gpio_fault_config_t *config, mcpwm_fa // if interrupt priority specified before, it cannot be changed until the group is released // check if the new priority specified consistents with the old one - ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group intrrupt priority failed"); + ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group interrupt priority failed"); // GPIO configuration gpio_config_t gpio_conf = { diff --git a/components/esp_driver_mcpwm/src/mcpwm_oper.c b/components/esp_driver_mcpwm/src/mcpwm_oper.c index ce8d3a7f09..fc40e0a751 100644 --- a/components/esp_driver_mcpwm/src/mcpwm_oper.c +++ b/components/esp_driver_mcpwm/src/mcpwm_oper.c @@ -106,7 +106,7 @@ esp_err_t mcpwm_new_operator(const mcpwm_operator_config_t *config, mcpwm_oper_h // if interrupt priority specified before, it cannot be changed until the group is released // check if the new priority specified consistents with the old one - ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group intrrupt priority failed"); + ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group interrupt priority failed"); // reset MCPWM operator mcpwm_hal_operator_reset(hal, oper_id); diff --git a/components/esp_driver_mcpwm/src/mcpwm_timer.c b/components/esp_driver_mcpwm/src/mcpwm_timer.c index bf92bbe491..19dc756af1 100644 --- a/components/esp_driver_mcpwm/src/mcpwm_timer.c +++ b/components/esp_driver_mcpwm/src/mcpwm_timer.c @@ -113,7 +113,7 @@ esp_err_t mcpwm_new_timer(const mcpwm_timer_config_t *config, mcpwm_timer_handle // if interrupt priority specified before, it cannot be changed until the group is released // check if the new priority specified consistents with the old one - ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group intrrupt priority failed"); + ESP_GOTO_ON_ERROR(mcpwm_check_intr_priority(group, config->intr_priority), err, TAG, "set group interrupt priority failed"); // select the clock source mcpwm_timer_clock_source_t clk_src = config->clk_src ? config->clk_src : MCPWM_TIMER_CLK_SRC_DEFAULT; diff --git a/components/esp_driver_mcpwm/test_apps/mcpwm/main/test_mcpwm_sync.c b/components/esp_driver_mcpwm/test_apps/mcpwm/main/test_mcpwm_sync.c index 5e364bdc97..7fb5328cfa 100644 --- a/components/esp_driver_mcpwm/test_apps/mcpwm/main/test_mcpwm_sync.c +++ b/components/esp_driver_mcpwm/test_apps/mcpwm/main/test_mcpwm_sync.c @@ -144,7 +144,7 @@ TEST_CASE("mcpwm_gpio_sync_timer_phase_lock", "[mcpwm]") sync_phase_config.sync_src = gpio_sync_src; TEST_ESP_OK(mcpwm_timer_set_phase_on_sync(timers[0], &sync_phase_config)); - // simulate an GPIO sync singal + // simulate an GPIO sync signal gpio_set_level(gpio_num, 1); gpio_set_level(gpio_num, 0); check_mcpwm_timer_phase(timers, SOC_MCPWM_CAPTURE_TIMERS_PER_GROUP, 100, MCPWM_TIMER_DIRECTION_UP); diff --git a/components/esp_driver_parlio/Kconfig b/components/esp_driver_parlio/Kconfig index ad6f91847a..e8f94f7189 100644 --- a/components/esp_driver_parlio/Kconfig +++ b/components/esp_driver_parlio/Kconfig @@ -5,7 +5,7 @@ menu "ESP-Driver:Parallel IO Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for parallel IO driver. + whether to enable the debug log message for parallel IO driver. Note that, this option only controls the parallel IO driver log, won't affect other drivers. config PARLIO_ISR_IRAM_SAFE diff --git a/components/esp_driver_parlio/include/driver/parlio_rx.h b/components/esp_driver_parlio/include/driver/parlio_rx.h index a080c399d1..400b10beab 100644 --- a/components/esp_driver_parlio/include/driver/parlio_rx.h +++ b/components/esp_driver_parlio/include/driver/parlio_rx.h @@ -129,7 +129,7 @@ typedef struct { uint32_t start_bit_included: 1; /*!< Whether data bit is included in the start pulse */ uint32_t end_bit_included: 1; /*!< Whether data bit is included in the end pulse, only valid when `has_end_pulse` is true */ uint32_t has_end_pulse: 1; /*!< Whether there's an end pulse to terminate the transaction, - if no, the transaction will be terminated by user configured transcation length */ + if no, the transaction will be terminated by user configured transaction length */ uint32_t pulse_invert: 1; /*!< Whether to invert the pulse */ } flags; /*!< Extra flags */ } parlio_rx_pulse_delimiter_config_t; diff --git a/components/esp_driver_parlio/include/driver/parlio_tx.h b/components/esp_driver_parlio/include/driver/parlio_tx.h index cb85cf327e..b203a449da 100644 --- a/components/esp_driver_parlio/include/driver/parlio_tx.h +++ b/components/esp_driver_parlio/include/driver/parlio_tx.h @@ -158,7 +158,7 @@ typedef struct { /** * @brief Transmit data on by Parallel IO TX unit * - * @note After the function returns, it doesn't mean the transaction is finished. This function only constructs a transcation structure and push into a queue. + * @note After the function returns, it doesn't mean the transaction is finished. This function only constructs a transaction structure and push into a queue. * * @param[in] tx_unit Parallel IO TX unit that created by `parlio_new_tx_unit` * @param[in] payload Pointer to the data to be transmitted diff --git a/components/esp_driver_parlio/src/parlio_rx.c b/components/esp_driver_parlio/src/parlio_rx.c index 59eb54e5af..6ea8fcd038 100644 --- a/components/esp_driver_parlio/src/parlio_rx.c +++ b/components/esp_driver_parlio/src/parlio_rx.c @@ -120,7 +120,7 @@ typedef struct parlio_rx_delimiter_t { uint32_t start_bit_included: 1; /*!< Whether data bit is included in the start pulse */ uint32_t end_bit_included: 1; /*!< Whether data bit is included in the end pulse, only valid when `has_end_pulse` is true */ uint32_t has_end_pulse: 1; /*!< Whether there's an end pulse to terminate the transaction, - if no, the transaction will be terminated by user configured transcation length */ + if no, the transaction will be terminated by user configured transaction length */ uint32_t pulse_invert: 1; /*!< Whether to invert the pulse */ } flags; } parlio_rx_delimiter_t; @@ -642,7 +642,7 @@ esp_err_t parlio_rx_unit_enable(parlio_rx_unit_handle_t rx_unit, bool reset_queu ESP_GOTO_ON_FALSE(!rx_unit->is_enabled, ESP_ERR_INVALID_STATE, err, TAG, "the unit has enabled or running"); rx_unit->is_enabled = true; - /* Acquire the power management lock incase */ + /* Acquire the power management lock in case */ if (rx_unit->pm_lock) { esp_pm_lock_acquire(rx_unit->pm_lock); } diff --git a/components/esp_driver_pcnt/Kconfig b/components/esp_driver_pcnt/Kconfig index e7f2d526e5..f34768a0fb 100644 --- a/components/esp_driver_pcnt/Kconfig +++ b/components/esp_driver_pcnt/Kconfig @@ -19,7 +19,7 @@ menu "ESP-Driver:PCNT Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy PCNT driver (driver/pcnt.h). + whether to suppress the deprecation warnings when using legacy PCNT driver (driver/pcnt.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -27,6 +27,6 @@ menu "ESP-Driver:PCNT Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for PCNT driver. + whether to enable the debug log message for PCNT driver. Note that, this option only controls the PCNT driver log, won't affect other drivers. endmenu diff --git a/components/esp_driver_pcnt/include/driver/pulse_cnt.h b/components/esp_driver_pcnt/include/driver/pulse_cnt.h index 166d5ce5ae..f1a66c6c3d 100644 --- a/components/esp_driver_pcnt/include/driver/pulse_cnt.h +++ b/components/esp_driver_pcnt/include/driver/pulse_cnt.h @@ -161,7 +161,7 @@ typedef struct { * @return * - ESP_OK: Set clear signal successfully * - ESP_ERR_INVALID_ARG: Set clear signal failed because of invalid argument - * - ESP_ERR_INVALID_STATE: Set clear signal failed because set clear signal repeatly or disable clear signal before set it + * - ESP_ERR_INVALID_STATE: Set clear signal failed because set clear signal repeatedly or disable clear signal before set it * - ESP_FAIL: Set clear signal failed because of other error */ esp_err_t pcnt_unit_set_clear_signal(pcnt_unit_handle_t unit, const pcnt_clear_signal_config_t *config); diff --git a/components/esp_driver_pcnt/test_apps/pulse_cnt/main/test_pulse_cnt.c b/components/esp_driver_pcnt/test_apps/pulse_cnt/main/test_pulse_cnt.c index 8acdcdaf7c..6257202c27 100644 --- a/components/esp_driver_pcnt/test_apps/pulse_cnt/main/test_pulse_cnt.c +++ b/components/esp_driver_pcnt/test_apps/pulse_cnt/main/test_pulse_cnt.c @@ -32,7 +32,7 @@ TEST_CASE("pcnt_unit_install_uninstall", "[pcnt]") TEST_ASSERT_EQUAL(0, count_value); } - // unit with a different intrrupt priority + // unit with a different interrupt priority unit_config.intr_priority = 3; TEST_ESP_ERR(ESP_ERR_INVALID_STATE, pcnt_new_unit(&unit_config, &units[SOC_PCNT_UNITS_PER_GROUP - 1])); unit_config.intr_priority = 0; diff --git a/components/esp_driver_rmt/Kconfig b/components/esp_driver_rmt/Kconfig index 94867aef56..48302fa2fb 100644 --- a/components/esp_driver_rmt/Kconfig +++ b/components/esp_driver_rmt/Kconfig @@ -22,6 +22,6 @@ menu "ESP-Driver:RMT Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for RMT driver. + whether to enable the debug log message for RMT driver. Note that, this option only controls the RMT driver log, won't affect other drivers. endmenu diff --git a/components/esp_driver_rmt/src/rmt_encoder.c b/components/esp_driver_rmt/src/rmt_encoder.c index 91f81808b2..3a0c8a2aa3 100644 --- a/components/esp_driver_rmt/src/rmt_encoder.c +++ b/components/esp_driver_rmt/src/rmt_encoder.c @@ -52,7 +52,7 @@ static size_t IRAM_ATTR rmt_encode_bytes(rmt_encoder_t *encoder, rmt_channel_han { rmt_bytes_encoder_t *bytes_encoder = __containerof(encoder, rmt_bytes_encoder_t, base); rmt_tx_channel_t *tx_chan = __containerof(channel, rmt_tx_channel_t, base); - const uint8_t *nd = (const uint8_t *)primary_data; + const uint8_t *raw_data = (const uint8_t *)primary_data; rmt_encode_state_t state = RMT_ENCODING_RESET; rmt_dma_descriptor_t *desc0 = NULL; rmt_dma_descriptor_t *desc1 = NULL; @@ -87,7 +87,7 @@ static size_t IRAM_ATTR rmt_encode_bytes(rmt_encoder_t *encoder, rmt_channel_han size_t len = encode_len; while (len > 0) { // start from last time truncated encoding - uint8_t cur_byte = nd[byte_index]; + uint8_t cur_byte = raw_data[byte_index]; // bit-wise reverse if (bytes_encoder->flags.msb_first) { cur_byte = hal_utils_bitwise_reverse8(cur_byte); @@ -313,7 +313,7 @@ esp_err_t rmt_encoder_reset(rmt_encoder_handle_t encoder) return encoder->reset(encoder); } -void* rmt_alloc_encoder_mem(size_t size) +void *rmt_alloc_encoder_mem(size_t size) { return heap_caps_calloc(1, size, RMT_MEM_ALLOC_CAPS); } diff --git a/components/esp_driver_rmt/src/rmt_rx.c b/components/esp_driver_rmt/src/rmt_rx.c index 1d7afdec23..cc33f75d9f 100644 --- a/components/esp_driver_rmt/src/rmt_rx.c +++ b/components/esp_driver_rmt/src/rmt_rx.c @@ -273,7 +273,7 @@ esp_err_t rmt_new_rx_channel(const rmt_rx_channel_config_t *config, rmt_channel_ rmt_ll_rx_enable_wrap(hal->regs, channel_id, true); #endif #if SOC_RMT_SUPPORT_RX_DEMODULATION - // disable carrier demodulation by default, can reenable by `rmt_apply_carrier()` + // disable carrier demodulation by default, can re-enable by `rmt_apply_carrier()` rmt_ll_rx_enable_carrier_demodulation(hal->regs, channel_id, false); #endif diff --git a/components/esp_driver_rmt/src/rmt_tx.c b/components/esp_driver_rmt/src/rmt_tx.c index c5f8478b37..2d59b0017f 100644 --- a/components/esp_driver_rmt/src/rmt_tx.c +++ b/components/esp_driver_rmt/src/rmt_tx.c @@ -329,7 +329,7 @@ esp_err_t rmt_new_tx_channel(const rmt_tx_channel_config_t *config, rmt_channel_ rmt_ll_tx_set_mem_blocks(hal->regs, channel_id, tx_channel->base.mem_block_num); // set limit threshold, after transmit ping_pong_symbols size, an interrupt event would be generated rmt_ll_tx_set_limit(hal->regs, channel_id, tx_channel->ping_pong_symbols); - // disable carrier modulation by default, can reenable by `rmt_apply_carrier()` + // disable carrier modulation by default, can re-enable by `rmt_apply_carrier()` rmt_ll_tx_enable_carrier_modulation(hal->regs, channel_id, false); // idle level is determined by register value rmt_ll_tx_fix_idle_level(hal->regs, channel_id, 0, true); diff --git a/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_iram.c b/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_iram.c index 2bab22f3f2..c194259d70 100644 --- a/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_iram.c +++ b/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_iram.c @@ -42,7 +42,7 @@ static void test_rmt_tx_iram_safe(size_t mem_block_symbols, bool with_dma) printf("enable tx channel\r\n"); TEST_ESP_OK(rmt_enable(tx_channel_multi_leds)); - // Mutiple LEDs (ping-pong in the background) + // Multiple LEDs (ping-pong in the background) printf("ping pong transmission: light up 100 RGB LEDs\r\n"); rmt_transmit_config_t transmit_config = { .loop_count = 0, // no loop diff --git a/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_tx.c b/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_tx.c index 8fbca6f6a2..15cf1a5512 100644 --- a/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_tx.c +++ b/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_tx.c @@ -162,7 +162,7 @@ static void test_rmt_ping_pong_trans(size_t mem_block_symbols, bool with_dma) printf("enable tx channel\r\n"); TEST_ESP_OK(rmt_enable(tx_channel_multi_leds)); - // Mutiple LEDs (ping-pong in the background) + // Multiple LEDs (ping-pong in the background) printf("ping pong transmission: light up %d RGB LEDs\r\n", test_led_num); rmt_transmit_config_t transmit_config = { .loop_count = 0, // no loop diff --git a/components/esp_driver_sdio/src/sdio_slave.c b/components/esp_driver_sdio/src/sdio_slave.c index f7ee836ef5..1689f97f18 100644 --- a/components/esp_driver_sdio/src/sdio_slave.c +++ b/components/esp_driver_sdio/src/sdio_slave.c @@ -113,7 +113,7 @@ typedef struct recv_desc_s { // first 3 WORDs of this struct is defined by and compatible to the DMA link list format. uint32_t _reserved0; uint32_t _reserved1; - TAILQ_ENTRY(recv_desc_s) te; // tailq used to store the registered descriptors. + TAILQ_ENTRY(recv_desc_s) tail_entry; // tailq used to store the registered descriptors. }; }; } recv_desc_t; @@ -367,8 +367,8 @@ void sdio_slave_deinit(void) //unregister all buffers registered but returned (not loaded) recv_desc_t *temp_desc; recv_desc_t *desc; - TAILQ_FOREACH_SAFE(desc, &context.recv_reg_list, te, temp_desc) { - TAILQ_REMOVE(&context.recv_reg_list, desc, te); + TAILQ_FOREACH_SAFE(desc, &context.recv_reg_list, tail_entry, temp_desc) { + TAILQ_REMOVE(&context.recv_reg_list, desc, tail_entry); free(desc); } //unregister all buffers that is loaded and not returned @@ -719,7 +719,7 @@ esp_err_t sdio_slave_recv_load_buf(sdio_slave_buf_handle_t handle) assert(desc->not_receiving); critical_enter_recv(); - TAILQ_REMOVE(&context.recv_reg_list, desc, te); + TAILQ_REMOVE(&context.recv_reg_list, desc, tail_entry); desc->not_receiving = 0; //manually remove the prev link (by set not_receiving=0), to indicate this is in the queue sdio_slave_hal_load_buf(context.hal, &desc->hal_desc); critical_exit_recv(); @@ -739,7 +739,7 @@ sdio_slave_buf_handle_t sdio_slave_recv_register_buf(uint8_t *start) //initially in the reg list sdio_slave_hal_recv_init_desc(context.hal, &desc->hal_desc, start); critical_enter_recv(); - TAILQ_INSERT_TAIL(&context.recv_reg_list, desc, te); + TAILQ_INSERT_TAIL(&context.recv_reg_list, desc, tail_entry); critical_exit_recv(); return desc; } @@ -748,7 +748,7 @@ esp_err_t sdio_slave_recv(sdio_slave_buf_handle_t *handle_ret, uint8_t **out_add { esp_err_t ret = sdio_slave_recv_packet(handle_ret, wait); if (ret == ESP_ERR_NOT_FINISHED) { - //This API was not awared of the EOF info, return ESP_OK to keep back-compatible. + //This API was not aware of the EOF info, return ESP_OK to keep back-compatible. ret = ESP_OK; } if (ret == ESP_OK) { @@ -776,7 +776,7 @@ esp_err_t sdio_slave_recv_packet(sdio_slave_buf_handle_t *handle_ret, TickType_t //remove from queue, add back to reg list. recv_desc_t *desc = (recv_desc_t *)sdio_slave_hal_recv_unload_desc(context.hal); assert(desc != NULL && desc->hal_desc.owner == 0); - TAILQ_INSERT_TAIL(&context.recv_reg_list, desc, te); + TAILQ_INSERT_TAIL(&context.recv_reg_list, desc, tail_entry); critical_exit_recv(); *handle_ret = (sdio_slave_buf_handle_t)desc; @@ -793,7 +793,7 @@ esp_err_t sdio_slave_recv_unregister_buf(sdio_slave_buf_handle_t handle) CHECK_HANDLE_IDLE(desc); //in the queue, fail. critical_enter_recv(); - TAILQ_REMOVE(&context.recv_reg_list, desc, te); + TAILQ_REMOVE(&context.recv_reg_list, desc, tail_entry); critical_exit_recv(); free(desc); return ESP_OK; diff --git a/components/esp_driver_sdm/Kconfig b/components/esp_driver_sdm/Kconfig index b572c4ab9f..50de62c3c6 100644 --- a/components/esp_driver_sdm/Kconfig +++ b/components/esp_driver_sdm/Kconfig @@ -12,7 +12,7 @@ menu "ESP-Driver:Sigma Delta Modulator Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy sigma delta driver. + whether to suppress the deprecation warnings when using legacy sigma delta driver. If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -20,6 +20,6 @@ menu "ESP-Driver:Sigma Delta Modulator Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for SDM driver. + whether to enable the debug log message for SDM driver. Note that, this option only controls the SDM driver log, won't affect other drivers. endmenu # Sigma Delta Modulator Configurations diff --git a/components/esp_driver_sdspi/src/sdspi_private.h b/components/esp_driver_sdspi/src/sdspi_private.h index ab9ddc4321..c2c2797220 100644 --- a/components/esp_driver_sdspi/src/sdspi_private.h +++ b/components/esp_driver_sdspi/src/sdspi_private.h @@ -34,7 +34,7 @@ /// Data rejected due to write error #define TOKEN_RSP_WRITE_ERR 0b01101 -/// Data error tokens have format 0b0000xyzw where xyzw are signle bit flags. +/// Data error tokens have format 0b0000xyzw where xyzw are single bit flags. /// MASK and VAL are used to check if a token is an error token #define TOKEN_ERR_MASK 0b11110000 #define TOKEN_ERR_VAL 0b00000000 diff --git a/components/esp_driver_spi/include/driver/spi_common.h b/components/esp_driver_spi/include/driver/spi_common.h index 15672131ee..2cb99348d9 100644 --- a/components/esp_driver_spi/include/driver/spi_common.h +++ b/components/esp_driver_spi/include/driver/spi_common.h @@ -92,7 +92,7 @@ typedef spi_common_dma_t spi_dma_chan_t; * the IO_MUX or are -1. In that case, the IO_MUX is used. On ESP32, using GPIO matrix will bring about 25ns of input * delay, which may cause incorrect read for >40MHz speeds. * - * @note Be advised that the slave driver does not use the quadwp/quadhd lines and fields in spi_bus_config_t refering to these lines will be ignored and can thus safely be left uninitialized. + * @note Be advised that the slave driver does not use the quadwp/quadhd lines and fields in spi_bus_config_t referring to these lines will be ignored and can thus safely be left uninitialized. */ typedef struct { union { diff --git a/components/esp_driver_spi/include/driver/spi_master.h b/components/esp_driver_spi/include/driver/spi_master.h index bfd5ebc0c8..f225d2b109 100644 --- a/components/esp_driver_spi/include/driver/spi_master.h +++ b/components/esp_driver_spi/include/driver/spi_master.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2010-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2010-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -223,9 +223,9 @@ esp_err_t spi_device_queue_trans(spi_device_handle_t handle, spi_transaction_t * * @brief Get the result of a SPI transaction queued earlier by ``spi_device_queue_trans``. * * This routine will wait until a transaction to the given device - * succesfully completed. It will then return the description of the + * successfully completed. It will then return the description of the * completed transaction so software can inspect the result and e.g. free the memory or - * re-use the buffers. + * reuse the buffers. * * @param handle Device handle obtained using spi_host_add_dev * @param trans_desc Pointer to variable able to contain a pointer to the description of the transaction @@ -286,7 +286,7 @@ esp_err_t spi_device_polling_start(spi_device_handle_t handle, spi_transaction_t * @brief Poll until the polling transaction ends. * * This routine will not return until the transaction to the given device has - * succesfully completed. The task is not blocked, but actively busy-spins for + * successfully completed. The task is not blocked, but actively busy-spins for * the transaction to be completed. * * @param handle Device handle obtained using spi_host_add_dev @@ -385,7 +385,7 @@ void spi_get_timing(bool gpio_is_used, int input_delay_ns, int eff_clk, int *dum /** * @brief Get the frequency limit of current configurations. * SPI master working at this limit is OK, while above the limit, full duplex mode and DMA will not work, - * and dummy bits will be aplied in the half duplex mode. + * and dummy bits will be applied in the half duplex mode. * * @param gpio_is_used True if using GPIO matrix, or False if native pins are used. * @param input_delay_ns Input delay from SCLK launch edge to MISO data valid. diff --git a/components/esp_driver_spi/include/driver/spi_slave.h b/components/esp_driver_spi/include/driver/spi_slave.h index beef8866aa..2e316b9d1f 100644 --- a/components/esp_driver_spi/include/driver/spi_slave.h +++ b/components/esp_driver_spi/include/driver/spi_slave.h @@ -149,9 +149,9 @@ esp_err_t spi_slave_queue_trans(spi_host_device_t host, const spi_slave_transact * @brief Get the result of a SPI transaction queued earlier * * This routine will wait until a transaction to the given device (queued earlier with - * spi_slave_queue_trans) has succesfully completed. It will then return the description of the + * spi_slave_queue_trans) has successfully completed. It will then return the description of the * completed transaction so software can inspect the result and e.g. free the memory or - * re-use the buffers. + * reuse the buffers. * * It is mandatory to eventually use this function for any transaction queued by ``spi_slave_queue_trans``. * diff --git a/components/esp_driver_spi/include/driver/spi_slave_hd.h b/components/esp_driver_spi/include/driver/spi_slave_hd.h index a8ba436958..740cbde7ac 100644 --- a/components/esp_driver_spi/include/driver/spi_slave_hd.h +++ b/components/esp_driver_spi/include/driver/spi_slave_hd.h @@ -31,7 +31,7 @@ typedef struct { size_t len; ///< Len of data to send/receive. For receiving the buffer length should be multiples of 4 bytes, otherwise the extra part will be truncated. size_t trans_len; ///< For RX direction, it indicates the data actually received. For TX direction, it is meaningless. uint32_t flags; ///< Bitwise OR of SPI_SLAVE_HD_TRANS_* flags - void* arg; ///< Extra argument indiciating this data + void* arg; ///< Extra argument indicating this data } spi_slave_hd_data_t; /// Information of SPI Slave HD event diff --git a/components/esp_driver_spi/include/esp_private/spi_common_internal.h b/components/esp_driver_spi/include/esp_private/spi_common_internal.h index f8820171a0..6f0aa22ec8 100644 --- a/components/esp_driver_spi/include/esp_private/spi_common_internal.h +++ b/components/esp_driver_spi/include/esp_private/spi_common_internal.h @@ -225,7 +225,7 @@ typedef void(*dmaworkaround_cb_t)(void *arg); * @brief Request a reset for a certain DMA channel * * @note In some (well-defined) cases in the ESP32 (at least rev v.0 and v.1), a SPI DMA channel will get confused. This can be remedied - * by resetting the SPI DMA hardware in case this happens. Unfortunately, the reset knob used for thsi will reset _both_ DMA channels, and + * by resetting the SPI DMA hardware in case this happens. Unfortunately, the reset knob used for this will reset _both_ DMA channels, and * as such can only done safely when both DMA channels are idle. These functions coordinate this. * * Essentially, when a reset is needed, a driver can request this using spicommon_dmaworkaround_req_reset. This is supposed to be called diff --git a/components/esp_driver_spi/src/gpspi/spi_master.c b/components/esp_driver_spi/src/gpspi/spi_master.c index 3eaa65f369..ca791e25c5 100644 --- a/components/esp_driver_spi/src/gpspi/spi_master.c +++ b/components/esp_driver_spi/src/gpspi/spi_master.c @@ -558,7 +558,7 @@ nomem: esp_err_t spi_bus_remove_device(spi_device_handle_t handle) { SPI_CHECK(handle != NULL, "invalid handle", ESP_ERR_INVALID_ARG); - //These checks aren't exhaustive; another thread could sneak in a transaction inbetween. These are only here to + //These checks aren't exhaustive; another thread could sneak in a transaction in between. These are only here to //catch design errors and aren't meant to be triggered during normal operation. SPI_CHECK(uxQueueMessagesWaiting(handle->trans_queue) == 0, "Have unfinished transactions", ESP_ERR_INVALID_STATE); SPI_CHECK(handle->host->cur_cs == DEV_NUM_MAX || handle->host->device[handle->host->cur_cs] != handle, "Have unfinished transactions", ESP_ERR_INVALID_STATE); @@ -1192,7 +1192,7 @@ esp_err_t SPI_MASTER_ATTR spi_device_queue_trans(spi_device_handle_t handle, spi } #ifdef CONFIG_PM_ENABLE - // though clock source is selectable, read/write reg and mem of spi peripherial still use APB + // though clock source is selectable, read/write reg and mem of spi peripheral still use APB // and dma still use APB, so pm_lock is still needed esp_pm_lock_acquire(host->bus_attr->pm_lock); #endif @@ -1767,7 +1767,7 @@ esp_err_t SPI_MASTER_ATTR spi_device_queue_multi_trans(spi_device_handle_t handl SPI_CHECK(dma_desc_status == ESP_OK, "No available dma descriptors, increase the `max_transfer_sz`, or wait queued transactions are done", ESP_ERR_INVALID_STATE); //RX - //This is modified to the same lenght as tx length, when in fd mode, else it's `rxlength` + //This is modified to the same length as tx length, when in fd mode, else it's `rxlength` rx_buf_len = (seg_trans_desc[0].base.rxlength + 8 - 1) / 8; if (seg_trans_desc[0].base.rx_buffer) { portENTER_CRITICAL(&handle->host->spinlock); @@ -1789,7 +1789,7 @@ esp_err_t SPI_MASTER_ATTR spi_device_queue_multi_trans(spi_device_handle_t handl //RX if (seg_trans_desc[i].base.rx_buffer) { - //This is modified to the same lenght as tx length, when in fd mode, else it's `rxlength` + //This is modified to the same length as tx length, when in fd mode, else it's `rxlength` rx_buf_len = (seg_trans_desc[i].base.rxlength + 8 - 1) / 8; portENTER_CRITICAL(&handle->host->spinlock); dma_desc_status = spi_hal_sct_link_rx_seg_dma_desc(&handle->host->sct_desc_pool, seg_trans_desc[i].base.rx_buffer, rx_buf_len, &rx_used_dma_desc_num); diff --git a/components/esp_driver_spi/src/gpspi/spi_slave_hd.c b/components/esp_driver_spi/src/gpspi/spi_slave_hd.c index 2138db26c0..e85698825a 100644 --- a/components/esp_driver_spi/src/gpspi/spi_slave_hd.c +++ b/components/esp_driver_spi/src/gpspi/spi_slave_hd.c @@ -360,7 +360,7 @@ static IRAM_ATTR void spi_slave_hd_intr_segment(void *arg) } if (ret_queue) { ret = xQueueSendFromISR(host->tx_ret_queue, &host->tx_curr_trans, &awoken); - // The return queue is full. All the data remian in send_queue + ret_queue should not be more than the queue length. + // The return queue is full. All the data remain in send_queue + ret_queue should not be more than the queue length. assert(ret == pdTRUE); } host->tx_curr_trans.trans = NULL; @@ -385,7 +385,7 @@ static IRAM_ATTR void spi_slave_hd_intr_segment(void *arg) } if (ret_queue) { ret = xQueueSendFromISR(host->rx_ret_queue, &host->rx_curr_trans, &awoken); - // The return queue is full. All the data remian in send_queue + ret_queue should not be more than the queue length. + // The return queue is full. All the data remain in send_queue + ret_queue should not be more than the queue length. assert(ret == pdTRUE); } host->rx_curr_trans.trans = NULL; diff --git a/components/esp_driver_spi/test_apps/master/main/test_spi_master.c b/components/esp_driver_spi/test_apps/master/main/test_spi_master.c index 24e30ff6b7..9fac93ff37 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_spi_master.c +++ b/components/esp_driver_spi/test_apps/master/main/test_spi_master.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -659,7 +659,7 @@ TEST_CASE("SPI Master no response when switch from host1 (SPI2) to host2 (SPI3)" TEST_ESP_OK(spi_bus_add_device(host, &device_config, &spi)); printf("before second xmit\n"); - // the original version (bit mis-written) stucks here. + // the original version (bit miswritten) stucks here. TEST_ESP_OK(spi_device_transmit(spi, &transaction)); // test case success when see this. printf("after second xmit\n"); @@ -874,7 +874,7 @@ void test_cmd_addr(spi_slave_task_context_t *slave_context, bool lsb_first) #ifdef CONFIG_IDF_TARGET_ESP32 addr_bits = 56 - 8 * i; #elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 - //ESP32S2 only supportes up to 32 bits address + //ESP32S2 only supports up to 32 bits address addr_bits = 28 - 4 * i; #endif int round_up = (cmd_bits + addr_bits + 7) / 8 * 8; @@ -1529,7 +1529,7 @@ void test_add_device_master(void) //1. add max dummy devices //2. replace devs[i] as a real device, than start a transaction //3. free devs[i] after transaction to release the real CS pin for using again by another dev, - //So it will loop to check every gpio_sigal one by one use one physical pin + //So it will loop to check every gpio_signal one by one use one physical pin spi_bus_remove_device(devs[i]); dev_cfg.spics_io_num = CS_REAL_DEV; TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &dev_cfg, &devs[i])); @@ -1608,7 +1608,7 @@ TEST_CASE("test_master_isr_pin_to_core", "[spi]") { spi_device_handle_t dev0; uint32_t master_send; - uint32_t master_recive; + uint32_t master_receive; uint32_t master_expect; spi_bus_config_t buscfg = SPI_BUS_TEST_DEFAULT_CONFIG(); @@ -1617,7 +1617,7 @@ TEST_CASE("test_master_isr_pin_to_core", "[spi]") spi_transaction_t trans_cfg = { .tx_buffer = &master_send, - .rx_buffer = &master_recive, + .rx_buffer = &master_receive, .user = & master_expect, .length = sizeof(uint32_t) * 8, }; @@ -1684,7 +1684,7 @@ static IRAM_ATTR void test_master_iram(void) .length = TEST_MASTER_IRAM_TRANS_LEN * 8, }, *ret_trans; - // Test intrrupt trans api once ----------------------------- + // Test interrupt trans api once ----------------------------- unity_send_signal("Master ready"); unity_wait_for_signal("Slave ready"); @@ -1692,7 +1692,7 @@ static IRAM_ATTR void test_master_iram(void) flag_trans_done = false; spi_device_queue_trans(dev_handle, &trans_cfg, portMAX_DELAY); while (!flag_trans_done) { - // waitting for transaction done and return from ISR + // waiting for transaction done and return from ISR } spi_device_get_trans_result(dev_handle, &ret_trans, portMAX_DELAY); spi_flash_enable_interrupts_caches_and_other_cpu(); diff --git a/components/esp_driver_spi/test_apps/master/main/test_spi_master_sct.c b/components/esp_driver_spi/test_apps/master/main/test_spi_master_sct.c index fad0d54288..527ee76cad 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_spi_master_sct.c +++ b/components/esp_driver_spi/test_apps/master/main/test_spi_master_sct.c @@ -76,7 +76,7 @@ static void hd_master(void) .tx_buffer = (uint8_t *) &master_tx_val, }, }, - //TEST_HD_DATA_LEN of TX data, splitted into 2 segments. `TEST_HD_DATA_LEN_PER_SEG` per segment + //TEST_HD_DATA_LEN of TX data, split into 2 segments. `TEST_HD_DATA_LEN_PER_SEG` per segment { .base = { .cmd = 0x3, @@ -120,7 +120,7 @@ static void hd_master(void) .rx_buffer = (uint8_t *) &master_rx_val, }, }, - // TEST_HD_DATA_LEN of TX data, splitted into 2 segments. `TEST_HD_DATA_LEN_PER_SEG` per segment + // TEST_HD_DATA_LEN of TX data, split into 2 segments. `TEST_HD_DATA_LEN_PER_SEG` per segment { .base = { .cmd = 0x4, diff --git a/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c b/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c index de593a0ddf..3afc9eca6e 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c +++ b/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -143,8 +143,8 @@ TEST_CASE("SPI Single Board Test SIO", "[spi]") #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4) //IDF-7503 slave support /******************************************************************************** * Test SIO Master - * SIO Slave is not suported, and one unit test is limited to one feature, so,,, - * sio master test can be splited to singal-input and single-output + * SIO Slave is not supported, and one unit test is limited to one feature, so,,, + * sio master test can be split to signal-input and single-output * * for single-output: master slave * cs-----cs ------------- cs @@ -178,7 +178,7 @@ void test_sio_master_trans(bool sio_master_in) uint8_t *master_tx_max = heap_caps_calloc(TRANS_LEN * 2, 1, MALLOC_CAP_DMA); TEST_ASSERT_NOT_NULL_MESSAGE(master_tx_max, "malloc failed, exit.\n"); - // write somethin to a long buffer for test long transmition + // write somethin to a long buffer for test long transmission for (uint16_t i = 0; i < TRANS_LEN; i++) { master_tx_max[i] = i; master_tx_max[TRANS_LEN * 2 - i - 1] = i; @@ -208,7 +208,7 @@ void test_sio_master_trans(bool sio_master_in) if (sio_master_in) { // master input only section trans.rxlength = (i + 1) * 8 * 8; - // test a huge data for last transmition + // test a huge data for last transmission if (i >= TEST_NUM - 1) { trans.rxlength = TRANS_LEN * 8; } @@ -219,14 +219,14 @@ void test_sio_master_trans(bool sio_master_in) } else { // master output only section trans.length = MAX_TRANS_BUFF / (i + 1) * 8; - // test a huge data for last transmition + // test a huge data for last transmission if (i >= TEST_NUM - 1) { trans.length = TRANS_LEN * 8; } trans.tx_buffer = master_tx_max; trans.rxlength = 0; trans.rx_buffer = NULL; - // use some differnt data + // use some different data trans.tx_buffer += (i % 2) ? TRANS_LEN : 0; } @@ -252,7 +252,7 @@ void test_sio_slave_emulate(bool sio_master_in) uint8_t *slave_tx_max = heap_caps_calloc(TRANS_LEN * 2, 1, MALLOC_CAP_DMA); TEST_ASSERT_NOT_NULL_MESSAGE(slave_tx_max, "malloc failed, exit.\n"); - // write somethin to a long buffer for test long transmition + // write somethin to a long buffer for test long transmission for (uint16_t i = 0; i < TRANS_LEN; i++) { slave_tx_max[i] = i; slave_tx_max[TRANS_LEN * 2 - i - 1] = i; @@ -275,7 +275,7 @@ void test_sio_slave_emulate(bool sio_master_in) if (sio_master_in) { // slave output only section trans.length = (i + 1) * 8 * 8; - // test a huge data for last transmition + // test a huge data for last transmission if (i >= TEST_NUM - 1) { trans.length = TRANS_LEN * 8; } @@ -284,7 +284,7 @@ void test_sio_slave_emulate(bool sio_master_in) } else { // slave input only section trans.length = MAX_TRANS_BUFF / (i + 1) * 8; - // test a huge data for last transmition + // test a huge data for last transmission if (i >= TEST_NUM - 1) { trans.length = TRANS_LEN * 8; } diff --git a/components/esp_driver_spi/test_apps/param/main/test_spi_param.c b/components/esp_driver_spi/test_apps/param/main/test_spi_param.c index e94994298a..70e7eb5aed 100644 --- a/components/esp_driver_spi/test_apps/param/main/test_spi_param.c +++ b/components/esp_driver_spi/test_apps/param/main/test_spi_param.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -1284,7 +1284,7 @@ static void test_master_fd_dma(void) { spi_device_handle_t dev0; uint8_t *master_send = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); - uint8_t *master_recive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); + uint8_t *master_receive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); uint8_t *master_expect = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1314,22 +1314,22 @@ static void test_master_fd_dma(void) unity_send_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(master_recive, 0x00, TEST_STEP_LEN); + memset(master_receive, 0x00, TEST_STEP_LEN); test_fill_random_to_buffers_dualboard(119 + mode + speed_level + i, master_send, master_expect, TEST_STEP_LEN); uint32_t test_trans_len = TEST_STEP_LEN; spi_transaction_t trans_cfg = { .tx_buffer = master_send, - .rx_buffer = master_recive, + .rx_buffer = master_receive, .length = test_trans_len * 8, }; unity_wait_for_signal("Slave ready"); TEST_ESP_OK(spi_device_transmit(dev0, &trans_cfg)); ESP_LOG_BUFFER_HEX("master tx", master_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("master exp", master_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(master_expect, master_recive, test_trans_len); + spitest_cmp_or_dump(master_expect, master_receive, test_trans_len); } TEST_ESP_OK(spi_bus_remove_device(dev0)); } @@ -1337,14 +1337,14 @@ static void test_master_fd_dma(void) } } free(master_send); - free(master_recive); + free(master_receive); free(master_expect); } static void test_slave_fd_dma(void) { uint8_t *slave_send = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); - uint8_t *slave_recive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); + uint8_t *slave_receive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); uint8_t *slave_expect = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1365,13 +1365,13 @@ static void test_slave_fd_dma(void) printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (is_gpio) ? "GPIO_Matrix" : "IOMUX", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(slave_recive, 0x00, TEST_STEP_LEN); + memset(slave_receive, 0x00, TEST_STEP_LEN); test_fill_random_to_buffers_dualboard(119 + mode + speed_level + i, slave_expect, slave_send, TEST_STEP_LEN); uint32_t test_trans_len = TEST_STEP_LEN; spi_slave_transaction_t trans_cfg = { .tx_buffer = slave_send, - .rx_buffer = slave_recive, + .rx_buffer = slave_receive, .length = test_trans_len * 8, .flags = SPI_SLAVE_TRANS_DMA_BUFFER_ALIGN_AUTO, }; @@ -1379,16 +1379,16 @@ static void test_slave_fd_dma(void) TEST_ESP_OK(spi_slave_transmit(TEST_SPI_HOST, &trans_cfg, portMAX_DELAY)); ESP_LOG_BUFFER_HEX("slave tx", slave_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("slave exp", slave_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(slave_expect, slave_recive, test_trans_len); + spitest_cmp_or_dump(slave_expect, slave_receive, test_trans_len); } } TEST_ESP_OK(spi_slave_free(TEST_SPI_HOST)); } } free(slave_send); - free(slave_recive); + free(slave_receive); free(slave_expect); } @@ -1399,7 +1399,7 @@ static void test_master_fd_no_dma(void) { spi_device_handle_t dev0; uint8_t *master_send = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); - uint8_t *master_recive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); + uint8_t *master_receive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); uint8_t *master_expect = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1429,22 +1429,22 @@ static void test_master_fd_no_dma(void) unity_send_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(master_recive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); + memset(master_receive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); test_fill_random_to_buffers_dualboard(211 + mode + speed_level + i, master_send, master_expect, SOC_SPI_MAXIMUM_BUFFER_SIZE); uint32_t test_trans_len = SOC_SPI_MAXIMUM_BUFFER_SIZE; spi_transaction_t trans_cfg = { .tx_buffer = master_send, - .rx_buffer = master_recive, + .rx_buffer = master_receive, .length = test_trans_len * 8, }; unity_wait_for_signal("Slave ready"); TEST_ESP_OK(spi_device_transmit(dev0, &trans_cfg)); ESP_LOG_BUFFER_HEX("master tx", master_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("master exp", master_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(master_expect, master_recive, test_trans_len); + spitest_cmp_or_dump(master_expect, master_receive, test_trans_len); } TEST_ESP_OK(spi_bus_remove_device(dev0)); } @@ -1452,14 +1452,14 @@ static void test_master_fd_no_dma(void) } } free(master_send); - free(master_recive); + free(master_receive); free(master_expect); } static void test_slave_fd_no_dma(void) { uint8_t *slave_send = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); - uint8_t *slave_recive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); + uint8_t *slave_receive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); uint8_t *slave_expect = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1481,29 +1481,29 @@ static void test_slave_fd_no_dma(void) printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (is_gpio) ? "GPIO_Matrix" : "IOMUX", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(slave_recive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); + memset(slave_receive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); test_fill_random_to_buffers_dualboard(211 + mode + speed_level + i, slave_expect, slave_send, SOC_SPI_MAXIMUM_BUFFER_SIZE); uint32_t test_trans_len = SOC_SPI_MAXIMUM_BUFFER_SIZE; spi_slave_transaction_t trans_cfg = { .tx_buffer = slave_send, - .rx_buffer = slave_recive, + .rx_buffer = slave_receive, .length = test_trans_len * 8, }; unity_send_signal("Slave ready"); TEST_ESP_OK(spi_slave_transmit(TEST_SPI_HOST, &trans_cfg, portMAX_DELAY)); ESP_LOG_BUFFER_HEX("slave tx", slave_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("slave exp", slave_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(slave_expect, slave_recive, test_trans_len); + spitest_cmp_or_dump(slave_expect, slave_receive, test_trans_len); } } TEST_ESP_OK(spi_slave_free(TEST_SPI_HOST)); } } free(slave_send); - free(slave_recive); + free(slave_receive); free(slave_expect); } @@ -1515,7 +1515,7 @@ static void test_master_hd_dma(void) { spi_device_handle_t dev0; uint8_t *master_send = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); - uint8_t *master_recive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); + uint8_t *master_receive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); uint8_t *master_expect = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1536,18 +1536,18 @@ static void test_master_hd_dma(void) unity_send_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(master_recive, 0x00, TEST_STEP_LEN); + memset(master_receive, 0x00, TEST_STEP_LEN); test_fill_random_to_buffers_dualboard(985 + mode + speed_level + i, master_send, master_expect, TEST_STEP_LEN); uint32_t test_trans_len = TEST_STEP_LEN; unity_wait_for_signal("Slave ready"); - TEST_ESP_OK(essl_spi_rddma(dev0, master_recive, test_trans_len, -1, 0)); + TEST_ESP_OK(essl_spi_rddma(dev0, master_receive, test_trans_len, -1, 0)); TEST_ESP_OK(essl_spi_wrdma(dev0, master_send, test_trans_len, -1, 0)); ESP_LOG_BUFFER_HEX("master tx", master_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("master exp", master_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(master_expect, master_recive, test_trans_len); + spitest_cmp_or_dump(master_expect, master_receive, test_trans_len); } TEST_ESP_OK(spi_bus_remove_device(dev0)); } @@ -1555,14 +1555,14 @@ static void test_master_hd_dma(void) } } free(master_send); - free(master_recive); + free(master_receive); free(master_expect); } static void test_slave_hd_dma(void) { uint8_t *slave_send = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); - uint8_t *slave_recive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); + uint8_t *slave_receive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); uint8_t *slave_expect = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1580,7 +1580,7 @@ static void test_slave_hd_dma(void) printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (is_gpio) ? "GPIO_Matrix" : "IOMUX", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(slave_recive, 0x00, TEST_STEP_LEN); + memset(slave_receive, 0x00, TEST_STEP_LEN); test_fill_random_to_buffers_dualboard(985 + mode + speed_level + i, slave_expect, slave_send, TEST_STEP_LEN); uint32_t test_trans_len = TEST_STEP_LEN; @@ -1591,21 +1591,21 @@ static void test_slave_hd_dma(void) }; unity_send_signal("Slave ready"); TEST_ESP_OK(spi_slave_hd_queue_trans(TEST_SPI_HOST, SPI_SLAVE_CHAN_TX, &slave_trans, portMAX_DELAY)); - slave_trans.data = slave_recive; + slave_trans.data = slave_receive; TEST_ESP_OK(spi_slave_hd_queue_trans(TEST_SPI_HOST, SPI_SLAVE_CHAN_RX, &slave_trans, portMAX_DELAY)); TEST_ESP_OK(spi_slave_hd_get_trans_res(TEST_SPI_HOST, SPI_SLAVE_CHAN_RX, &ret_trans, portMAX_DELAY)); ESP_LOG_BUFFER_HEX("slave tx", slave_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("slave exp", slave_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(slave_expect, slave_recive, test_trans_len); + spitest_cmp_or_dump(slave_expect, slave_receive, test_trans_len); } } TEST_ESP_OK(spi_slave_hd_deinit(TEST_SPI_HOST)); } } free(slave_send); - free(slave_recive); + free(slave_receive); free(slave_expect); } @@ -1616,7 +1616,7 @@ static void test_master_hd_no_dma(void) { spi_device_handle_t dev0; uint8_t *master_send = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); - uint8_t *master_recive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); + uint8_t *master_receive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); uint8_t *master_expect = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1637,18 +1637,18 @@ static void test_master_hd_no_dma(void) unity_send_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(master_recive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); + memset(master_receive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); test_fill_random_to_buffers_dualboard(911 + mode + speed_level + i, master_send, master_expect, SOC_SPI_MAXIMUM_BUFFER_SIZE); uint32_t test_trans_len = SOC_SPI_MAXIMUM_BUFFER_SIZE; unity_wait_for_signal("Slave ready"); - TEST_ESP_OK(essl_spi_rddma(dev0, master_recive, test_trans_len, -1, 0)); + TEST_ESP_OK(essl_spi_rddma(dev0, master_receive, test_trans_len, -1, 0)); TEST_ESP_OK(essl_spi_wrdma(dev0, master_send, test_trans_len, -1, 0)); ESP_LOG_BUFFER_HEX("master tx", master_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("master rx", master_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("master exp", master_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(master_expect, master_recive, test_trans_len); + spitest_cmp_or_dump(master_expect, master_receive, test_trans_len); } TEST_ESP_OK(spi_bus_remove_device(dev0)); } @@ -1656,14 +1656,14 @@ static void test_master_hd_no_dma(void) } } free(master_send); - free(master_recive); + free(master_receive); free(master_expect); } static void test_slave_hd_no_dma(void) { uint8_t *slave_send = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); - uint8_t *slave_recive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); + uint8_t *slave_receive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); uint8_t *slave_expect = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DEFAULT); for (uint8_t is_gpio = 0; is_gpio < 2; is_gpio++) { @@ -1681,7 +1681,7 @@ static void test_slave_hd_no_dma(void) printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (is_gpio) ? "GPIO_Matrix" : "IOMUX", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(slave_recive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); + memset(slave_receive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); test_fill_random_to_buffers_dualboard(911 + mode + speed_level + i, slave_expect, slave_send, SOC_SPI_MAXIMUM_BUFFER_SIZE); uint32_t test_trans_len = SOC_SPI_MAXIMUM_BUFFER_SIZE; @@ -1692,21 +1692,21 @@ static void test_slave_hd_no_dma(void) }; unity_send_signal("Slave ready"); TEST_ESP_OK(spi_slave_hd_queue_trans(TEST_SPI_HOST, SPI_SLAVE_CHAN_TX, &slave_trans, portMAX_DELAY)); - slave_trans.data = slave_recive; + slave_trans.data = slave_receive; TEST_ESP_OK(spi_slave_hd_queue_trans(TEST_SPI_HOST, SPI_SLAVE_CHAN_RX, &slave_trans, portMAX_DELAY)); TEST_ESP_OK(spi_slave_hd_get_trans_res(TEST_SPI_HOST, SPI_SLAVE_CHAN_RX, &ret_trans, portMAX_DELAY)); ESP_LOG_BUFFER_HEX("slave tx", slave_send, test_trans_len); - ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_recive, test_trans_len, ESP_LOG_DEBUG); + ESP_LOG_BUFFER_HEX_LEVEL("slave rx", slave_receive, test_trans_len, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("slave exp", slave_expect, test_trans_len, ESP_LOG_DEBUG); - spitest_cmp_or_dump(slave_expect, slave_recive, test_trans_len); + spitest_cmp_or_dump(slave_expect, slave_receive, test_trans_len); } } TEST_ESP_OK(spi_slave_hd_deinit(TEST_SPI_HOST)); } } free(slave_send); - free(slave_recive); + free(slave_receive); free(slave_expect); } @@ -1722,7 +1722,7 @@ static void test_master_sio_dma(void) { spi_device_handle_t dev0; uint8_t *master_send = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); - uint8_t *master_recive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); + uint8_t *master_receive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); uint8_t *master_expect = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DEFAULT); for (uint8_t sio_master_in = 0; sio_master_in < 2; sio_master_in++) { @@ -1752,17 +1752,17 @@ static void test_master_sio_dma(void) devcfg.input_delay_ns = s_master_input_delay[speed_level]; #endif TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0)); - printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SongleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); + printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SingleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_send_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(master_recive, 0x00, TEST_STEP_LEN); + memset(master_receive, 0x00, TEST_STEP_LEN); test_fill_random_to_buffers_dualboard(110 + mode + speed_level + i, master_send, master_expect, TEST_STEP_LEN); spi_transaction_t trans = {}; if (sio_master_in) { // master input only trans.rxlength = TEST_STEP_LEN * 8; - trans.rx_buffer = master_recive; + trans.rx_buffer = master_receive; trans.length = 0; trans.tx_buffer = NULL; } else { @@ -1778,7 +1778,7 @@ static void test_master_sio_dma(void) if (sio_master_in) { ESP_LOG_BUFFER_HEX_LEVEL("master rx", trans.rx_buffer, TEST_STEP_LEN, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("master exp", master_expect, TEST_STEP_LEN, ESP_LOG_DEBUG); - spitest_cmp_or_dump(master_expect, master_recive, TEST_STEP_LEN); + spitest_cmp_or_dump(master_expect, master_receive, TEST_STEP_LEN); } else { ESP_LOG_BUFFER_HEX("master tx", trans.tx_buffer, TEST_STEP_LEN); } @@ -1789,14 +1789,14 @@ static void test_master_sio_dma(void) } } free(master_send); - free(master_recive); + free(master_receive); free(master_expect); } static void test_slave_sio_dma(void) { uint8_t *slave_send = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); - uint8_t *slave_recive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); + uint8_t *slave_receive = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DMA); uint8_t *slave_expect = heap_caps_malloc(TEST_STEP_LEN, MALLOC_CAP_DEFAULT); for (uint8_t sio_master_in = 0; sio_master_in < 2; sio_master_in++) { @@ -1814,16 +1814,16 @@ static void test_slave_sio_dma(void) slv_cfg.mode = mode; TEST_ESP_OK(spi_slave_initialize(TEST_SPI_HOST, &bus_cfg, &slv_cfg, SPI_DMA_CH_AUTO)); for (uint8_t speed_level = 0; speed_level < sizeof(s_spi_bus_freq) / sizeof(int); speed_level++) { - printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SongleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); + printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SingleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(slave_recive, 0x00, TEST_STEP_LEN); + memset(slave_receive, 0x00, TEST_STEP_LEN); test_fill_random_to_buffers_dualboard(110 + mode + speed_level + i, slave_expect, slave_send, TEST_STEP_LEN); spi_slave_transaction_t trans = { .length = TEST_STEP_LEN * 8, .tx_buffer = slave_send, - .rx_buffer = slave_recive, + .rx_buffer = slave_receive, .flags = SPI_SLAVE_TRANS_DMA_BUFFER_ALIGN_AUTO, }; unity_send_signal("Slave ready"); @@ -1834,7 +1834,7 @@ static void test_slave_sio_dma(void) } else { ESP_LOG_BUFFER_HEX_LEVEL("Slave rx", trans.rx_buffer, TEST_STEP_LEN, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("Slave exp", slave_expect, TEST_STEP_LEN, ESP_LOG_DEBUG); - spitest_cmp_or_dump(slave_expect, slave_recive, TEST_STEP_LEN); + spitest_cmp_or_dump(slave_expect, slave_receive, TEST_STEP_LEN); } } } @@ -1842,7 +1842,7 @@ static void test_slave_sio_dma(void) } } free(slave_send); - free(slave_recive); + free(slave_receive); free(slave_expect); } @@ -1853,7 +1853,7 @@ static void test_master_sio_no_dma(void) { spi_device_handle_t dev0; uint8_t *master_send = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); - uint8_t *master_recive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); + uint8_t *master_receive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); uint8_t *master_expect = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DEFAULT); for (uint8_t sio_master_in = 0; sio_master_in < 2; sio_master_in++) { @@ -1884,17 +1884,17 @@ static void test_master_sio_no_dma(void) devcfg.input_delay_ns = s_master_input_delay[speed_level]; #endif TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0)); - printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SongleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); + printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SingleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_send_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(master_recive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); + memset(master_receive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); test_fill_random_to_buffers_dualboard(122 + mode + speed_level + i, master_send, master_expect, SOC_SPI_MAXIMUM_BUFFER_SIZE); spi_transaction_t trans = {}; if (sio_master_in) { // master input only trans.rxlength = SOC_SPI_MAXIMUM_BUFFER_SIZE * 8; - trans.rx_buffer = master_recive; + trans.rx_buffer = master_receive; trans.length = 0; trans.tx_buffer = NULL; } else { @@ -1910,7 +1910,7 @@ static void test_master_sio_no_dma(void) if (sio_master_in) { ESP_LOG_BUFFER_HEX_LEVEL("master rx", trans.rx_buffer, SOC_SPI_MAXIMUM_BUFFER_SIZE, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("master exp", master_expect, SOC_SPI_MAXIMUM_BUFFER_SIZE, ESP_LOG_DEBUG); - spitest_cmp_or_dump(master_expect, master_recive, SOC_SPI_MAXIMUM_BUFFER_SIZE); + spitest_cmp_or_dump(master_expect, master_receive, SOC_SPI_MAXIMUM_BUFFER_SIZE); } else { ESP_LOG_BUFFER_HEX("master tx", trans.tx_buffer, SOC_SPI_MAXIMUM_BUFFER_SIZE); } @@ -1921,14 +1921,14 @@ static void test_master_sio_no_dma(void) } } free(master_send); - free(master_recive); + free(master_receive); free(master_expect); } static void test_slave_sio_no_dma(void) { uint8_t *slave_send = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); - uint8_t *slave_recive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); + uint8_t *slave_receive = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DMA); uint8_t *slave_expect = heap_caps_malloc(SOC_SPI_MAXIMUM_BUFFER_SIZE, MALLOC_CAP_DEFAULT); for (uint8_t sio_master_in = 0; sio_master_in < 2; sio_master_in++) { @@ -1947,16 +1947,16 @@ static void test_slave_sio_no_dma(void) TEST_ESP_OK(spi_slave_initialize(TEST_SPI_HOST, &bus_cfg, &slv_cfg, SPI_DMA_DISABLED)); for (uint8_t speed_level = 0; speed_level < sizeof(s_spi_bus_freq) / sizeof(int); speed_level++) { - printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SongleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); + printf("Next trans: %s\tmode:%d\t@%.2f MHz\n", (sio_master_in) ? "SingleIn" : "SingleOut", mode, s_spi_bus_freq[speed_level] / 1000000.f); unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_STEP; i++) { - memset(slave_recive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); + memset(slave_receive, 0x00, SOC_SPI_MAXIMUM_BUFFER_SIZE); test_fill_random_to_buffers_dualboard(122 + mode + speed_level + i, slave_expect, slave_send, SOC_SPI_MAXIMUM_BUFFER_SIZE); spi_slave_transaction_t trans = { .length = SOC_SPI_MAXIMUM_BUFFER_SIZE * 8, .tx_buffer = slave_send, - .rx_buffer = slave_recive, + .rx_buffer = slave_receive, }; unity_send_signal("Slave ready"); TEST_ESP_OK(spi_slave_transmit(TEST_SPI_HOST, &trans, portMAX_DELAY)); @@ -1966,7 +1966,7 @@ static void test_slave_sio_no_dma(void) } else { ESP_LOG_BUFFER_HEX_LEVEL("Slave rx", trans.rx_buffer, SOC_SPI_MAXIMUM_BUFFER_SIZE, ESP_LOG_DEBUG); ESP_LOG_BUFFER_HEX_LEVEL("Slave exp", slave_expect, SOC_SPI_MAXIMUM_BUFFER_SIZE, ESP_LOG_DEBUG); - spitest_cmp_or_dump(slave_expect, slave_recive, SOC_SPI_MAXIMUM_BUFFER_SIZE); + spitest_cmp_or_dump(slave_expect, slave_receive, SOC_SPI_MAXIMUM_BUFFER_SIZE); } } } @@ -1974,7 +1974,7 @@ static void test_slave_sio_no_dma(void) } } free(slave_send); - free(slave_recive); + free(slave_receive); free(slave_expect); } diff --git a/components/esp_driver_spi/test_apps/slave/main/test_spi_slave.c b/components/esp_driver_spi/test_apps/slave/main/test_spi_slave.c index c324358b4b..d9e7c2f8d1 100644 --- a/components/esp_driver_spi/test_apps/slave/main/test_spi_slave.c +++ b/components/esp_driver_spi/test_apps/slave/main/test_spi_slave.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -53,7 +53,7 @@ static void master_init(spi_device_handle_t *spi) .quadhd_io_num = -1 }; spi_device_interface_config_t devcfg = { - .clock_speed_hz = 4 * 1000 * 1000, //currently only up to 4MHz for internel connect + .clock_speed_hz = 4 * 1000 * 1000, //currently only up to 4MHz for internal connect .mode = 0, //SPI mode 0 .spics_io_num = PIN_NUM_CS, //CS pin .queue_size = 7, //We want to be able to queue 7 transactions at a time @@ -703,7 +703,7 @@ static void test_slave_isr_core_setup_cbk(spi_slave_transaction_t *curr_trans) TEST_CASE("test_slave_isr_pin_to_core", "[spi]") { uint32_t slave_send; - uint32_t slave_recive; + uint32_t slave_receive; uint32_t slave_expect; spi_bus_config_t buscfg = SPI_BUS_TEST_DEFAULT_CONFIG(); @@ -712,7 +712,7 @@ TEST_CASE("test_slave_isr_pin_to_core", "[spi]") spi_slave_transaction_t trans_cfg = { .tx_buffer = &slave_send, - .rx_buffer = &slave_recive, + .rx_buffer = &slave_receive, .user = &slave_expect, .length = sizeof(uint32_t) * 8, }; diff --git a/components/esp_driver_spi/test_apps/slave_hd/main/test_spi_slave_hd.c b/components/esp_driver_spi/test_apps/slave_hd/main/test_spi_slave_hd.c index 00622e78b8..116da10f11 100644 --- a/components/esp_driver_spi/test_apps/slave_hd/main/test_spi_slave_hd.c +++ b/components/esp_driver_spi/test_apps/slave_hd/main/test_spi_slave_hd.c @@ -922,7 +922,7 @@ void prepare_data(uint8_t *buff, uint32_t len, int8_t diff) void slave_run_append(void) { spi_bus_config_t bus_cfg = SPI_BUS_TEST_DEFAULT_CONFIG(); - bus_cfg.max_transfer_sz = 40000; //will prepare 40000/DMA_MAX_BUFF_SIZE +1 dma desciptor for use + bus_cfg.max_transfer_sz = 40000; //will prepare 40000/DMA_MAX_BUFF_SIZE +1 dma descriptor for use spi_slave_hd_slot_config_t slave_hd_cfg = SPI_SLOT_TEST_DEFAULT_CONFIG(); slave_hd_cfg.flags |= SPI_SLAVE_HD_APPEND_MODE; diff --git a/components/esp_driver_tsens/Kconfig b/components/esp_driver_tsens/Kconfig index 541e44c822..9bc99c7222 100644 --- a/components/esp_driver_tsens/Kconfig +++ b/components/esp_driver_tsens/Kconfig @@ -5,7 +5,7 @@ menu "ESP-Driver:Temperature Sensor Configurations" bool "Suppress legacy driver deprecated warning" default n help - Wether to suppress the deprecation warnings when using legacy temperature sensor driver + whether to suppress the deprecation warnings when using legacy temperature sensor driver (driver/temp_sensor.h). If you want to continue using the legacy driver, and don't want to see related deprecation warnings, you can enable this option. @@ -13,7 +13,7 @@ menu "ESP-Driver:Temperature Sensor Configurations" bool "Enable debug log" default n help - Wether to enable the debug log message for temperature sensor driver. + whether to enable the debug log message for temperature sensor driver. Note that, this option only controls the temperature sensor driver log, won't affect other drivers. config TEMP_SENSOR_ISR_IRAM_SAFE diff --git a/components/esp_driver_tsens/include/driver/temperature_sensor.h b/components/esp_driver_tsens/include/driver/temperature_sensor.h index ef8d653b65..3c2c18dc1c 100644 --- a/components/esp_driver_tsens/include/driver/temperature_sensor.h +++ b/components/esp_driver_tsens/include/driver/temperature_sensor.h @@ -33,7 +33,7 @@ typedef struct { } temperature_sensor_config_t; /** - * @brief temperature_sensor_config_t default constructure + * @brief temperature_sensor_config_t default constructor */ #define TEMPERATURE_SENSOR_CONFIG_DEFAULT(min, max) \ { \ diff --git a/components/esp_driver_tsens/src/temperature_sensor.c b/components/esp_driver_tsens/src/temperature_sensor.c index b1f80d9140..2bf39ca9bf 100644 --- a/components/esp_driver_tsens/src/temperature_sensor.c +++ b/components/esp_driver_tsens/src/temperature_sensor.c @@ -183,7 +183,7 @@ esp_err_t temperature_sensor_enable(temperature_sensor_handle_t tsens) temperature_sensor_ll_sample_enable(true); #endif // SOC_TEMPERATURE_SENSOR_INTR_SUPPORT - // After enabling/reseting the temperature sensor, + // After enabling/resetting the temperature sensor, // the output value gradually approaches the true temperature // value as the measurement time increases. 300us is recommended. esp_rom_delay_us(300); diff --git a/components/esp_driver_uart/include/driver/uart.h b/components/esp_driver_uart/include/driver/uart.h index 0b15be74a0..2ade613f59 100644 --- a/components/esp_driver_uart/include/driver/uart.h +++ b/components/esp_driver_uart/include/driver/uart.h @@ -828,7 +828,7 @@ esp_err_t uart_wait_tx_idle_polling(uart_port_t uart_num); * @brief Configure TX signal loop back to RX module, just for the test usage. * * @param uart_num UART number - * @param loop_back_en Set ture to enable the loop back function, else set it false. + * @param loop_back_en Set true to enable the loop back function, else set it false. * * * @return * - ESP_OK on success diff --git a/components/esp_driver_uart/include/driver/uart_vfs.h b/components/esp_driver_uart/include/driver/uart_vfs.h index 0521603ded..5510309aa6 100644 --- a/components/esp_driver_uart/include/driver/uart_vfs.h +++ b/components/esp_driver_uart/include/driver/uart_vfs.h @@ -34,7 +34,7 @@ void uart_vfs_dev_register(void); * @param uart_num the UART number * @param mode line endings to send to UART * - * @return 0 if successed, or -1 + * @return 0 if succeeded, or -1 * when an error (specified by errno) have occurred. */ int uart_vfs_dev_port_set_rx_line_endings(int uart_num, esp_line_endings_t mode); @@ -54,7 +54,7 @@ int uart_vfs_dev_port_set_rx_line_endings(int uart_num, esp_line_endings_t mode) * @param uart_num the UART number * @param mode line endings to send to UART * - * @return 0 if successed, or -1 + * @return 0 if succeeded, or -1 * when an error (specified by errno) have occurred. */ int uart_vfs_dev_port_set_tx_line_endings(int uart_num, esp_line_endings_t mode); diff --git a/components/esp_driver_uart/src/uart.c b/components/esp_driver_uart/src/uart.c index 83960dcb16..508e6fc350 100644 --- a/components/esp_driver_uart/src/uart.c +++ b/components/esp_driver_uart/src/uart.c @@ -86,7 +86,7 @@ static const char *UART_TAG = "uart"; // Check actual UART mode set #define UART_IS_MODE_SET(uart_number, mode) ((p_uart_obj[uart_number]->uart_mode == mode)) -#define UART_CONTEX_INIT_DEF(uart_num) {\ +#define UART_CONTEXT_INIT_DEF(uart_num) {\ .hal.dev = UART_LL_GET_HW(uart_num),\ INIT_CRIT_SECTION_LOCK_IN_STRUCT(spinlock)\ .hw_enabled = false,\ @@ -151,19 +151,19 @@ typedef struct { static uart_obj_t *p_uart_obj[UART_NUM_MAX] = {0}; static uart_context_t uart_context[UART_NUM_MAX] = { - UART_CONTEX_INIT_DEF(UART_NUM_0), - UART_CONTEX_INIT_DEF(UART_NUM_1), + UART_CONTEXT_INIT_DEF(UART_NUM_0), + UART_CONTEXT_INIT_DEF(UART_NUM_1), #if SOC_UART_HP_NUM > 2 - UART_CONTEX_INIT_DEF(UART_NUM_2), + UART_CONTEXT_INIT_DEF(UART_NUM_2), #endif #if SOC_UART_HP_NUM > 3 - UART_CONTEX_INIT_DEF(UART_NUM_3), + UART_CONTEXT_INIT_DEF(UART_NUM_3), #endif #if SOC_UART_HP_NUM > 4 - UART_CONTEX_INIT_DEF(UART_NUM_4), + UART_CONTEXT_INIT_DEF(UART_NUM_4), #endif #if (SOC_UART_LP_NUM >= 1) - UART_CONTEX_INIT_DEF(LP_UART_NUM_0), + UART_CONTEXT_INIT_DEF(LP_UART_NUM_0), #endif }; diff --git a/components/esp_driver_uart/test_apps/rs485/main/test_rs485.c b/components/esp_driver_uart/test_apps/rs485/main/test_rs485.c index dac0945a48..57691425e1 100644 --- a/components/esp_driver_uart/test_apps/rs485/main/test_rs485.c +++ b/components/esp_driver_uart/test_apps/rs485/main/test_rs485.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -27,7 +27,7 @@ // Wait timeout for uart driver #define PACKET_READ_TICS (2000 / portTICK_PERIOD_MS) -// This is for workarond to avoid master-slave syncronization issues +// This is for workarond to avoid master-slave synchronization issues // when slave gets the "Master_started" signal with delay ~2-3 seconds #define TEST_ALLOW_PROC_FAIL (10) #define TEST_CHECK_PROC_FAIL(fails, threshold) TEST_ASSERT((fails * 100 / PACKETS_NUMBER) <= threshold) @@ -202,7 +202,7 @@ static void rs485_slave(void) uint16_t err_count = 0, good_count = 0; unity_send_signal("Slave_ready"); unity_wait_for_signal("Master_started"); - ESP_LOGI(TAG, "Start recieve loop."); + ESP_LOGI(TAG, "Start receive loop."); for (int pack_count = 0; pack_count < PACKETS_NUMBER; pack_count++) { //Read slave_data from UART int len = uart_read_bytes(UART_NUM1, slave_data, BUF_SIZE, PACKET_READ_TICS); @@ -234,7 +234,7 @@ static void rs485_slave(void) // Master test of multi device test case. // It forms packet with random data, apply generated CRC16 and sends to slave. -// If response recieved correctly from slave means RS485 channel works. +// If response received correctly from slave means RS485 channel works. static void rs485_master(void) { uint16_t err_count = 0, good_count = 0; @@ -244,7 +244,7 @@ static void rs485_master(void) // The master test case should be synchronized with slave unity_wait_for_signal("Slave_ready"); unity_send_signal("Master_started"); - ESP_LOGI(TAG, "Start recieve loop."); + ESP_LOGI(TAG, "Start receive loop."); for (int i = 0; i < PACKETS_NUMBER; i++) { // Form random buffer with CRC16 buffer_fill_random(master_buffer, BUF_SIZE); diff --git a/components/esp_driver_uart/test_apps/uart_vfs/main/test_vfs_uart.c b/components/esp_driver_uart/test_apps/uart_vfs/main/test_vfs_uart.c index 8c45624f77..5cf95429d3 100644 --- a/components/esp_driver_uart/test_apps/uart_vfs/main/test_vfs_uart.c +++ b/components/esp_driver_uart/test_apps/uart_vfs/main/test_vfs_uart.c @@ -101,7 +101,7 @@ TEST_CASE("CRs are removed from the stdin correctly", "[vfs_uart]") fwrite_str_loopback(send_str + 11, 1); // send the '\r' vTaskDelay(10 / portTICK_PERIOD_MS); - rb = fread(dst, 1, 2, stdin); // try to get somthing + rb = fread(dst, 1, 2, stdin); // try to get something TEST_ASSERT_EQUAL(0, rb); // still nothing (\r is buffered) fwrite_str_loopback(send_str + 12, 1); // Now send the '1' diff --git a/components/esp_driver_usb_serial_jtag/include/driver/usb_serial_jtag.h b/components/esp_driver_usb_serial_jtag/include/driver/usb_serial_jtag.h index db2c00f544..93aec7a27e 100644 --- a/components/esp_driver_usb_serial_jtag/include/driver/usb_serial_jtag.h +++ b/components/esp_driver_usb_serial_jtag/include/driver/usb_serial_jtag.h @@ -86,7 +86,7 @@ esp_err_t usb_serial_jtag_driver_uninstall(void); * @brief Check if the USB Serial/JTAG port is connected to the host * * This function checks whether the USB Serial/JTAG (USJ) port is currently connected. USJ is considered "connected" - * so long as it is receiving SOF packets from the host, even if there is no serial commuincation occuring (i.e., the + * so long as it is receiving SOF packets from the host, even if there is no serial communications occurring (i.e., the * USJ is connected to the PC, but the serial port is not opened). Having the USB port connected to a power bank will * never be considered as connected (due to the lack of SOF packets). * diff --git a/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c b/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c index c2427b0c5a..fe374417e9 100644 --- a/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c +++ b/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c @@ -135,7 +135,7 @@ static void usb_serial_jtag_isr_handler_default(void *arg) } if (usbjtag_intr_status & USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT) { - // read rx buffer(max length is 64), and send avaliable data to ringbuffer. + // read rx buffer(max length is 64), and send available data to ringbuffer. // Ensure the rx buffer size is larger than RX_MAX_SIZE. usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT); uint32_t rx_fifo_len = usb_serial_jtag_ll_read_rxfifo(p_usb_serial_jtag_obj->rx_data_buf, USB_SER_JTAG_RX_MAX_SIZE); @@ -214,7 +214,7 @@ int usb_serial_jtag_read_bytes(void* buf, uint32_t length, TickType_t ticks_to_w return 0; } - // Recieve new data from ISR + // Receive new data from ISR data = (uint8_t*) xRingbufferReceiveUpTo(p_usb_serial_jtag_obj->rx_ring_buf, &data_read_len, (TickType_t) ticks_to_wait, length); if (data == NULL) { // If there is no data received from ringbuffer, return 0 directly. diff --git a/components/esp_hw_support/Kconfig b/components/esp_hw_support/Kconfig index 74c89f00cd..1ebb71c107 100644 --- a/components/esp_hw_support/Kconfig +++ b/components/esp_hw_support/Kconfig @@ -239,7 +239,7 @@ menu "Hardware Settings" bool "Enable debug log" default n help - Wether to enable the debug log message for ETM core driver. + whether to enable the debug log message for ETM core driver. Note that, this option only controls the ETM related driver log, won't affect other drivers. endmenu # ETM Configuration diff --git a/components/esp_lcd/Kconfig b/components/esp_lcd/Kconfig index b72408b5ed..60cde6973c 100644 --- a/components/esp_lcd/Kconfig +++ b/components/esp_lcd/Kconfig @@ -14,7 +14,7 @@ menu "LCD and Touch Panel" bool "Enable debug log" default n help - Wether to enable the debug log message for LCD driver. + whether to enable the debug log message for LCD driver. Note that, this option only controls the LCD driver log, won't affect other drivers. if SOC_LCD_RGB_SUPPORTED diff --git a/components/esp_lcd/dsi/esp_lcd_mipi_dsi_bus.c b/components/esp_lcd/dsi/esp_lcd_mipi_dsi_bus.c index 676702d401..9ecab59f6d 100644 --- a/components/esp_lcd/dsi/esp_lcd_mipi_dsi_bus.c +++ b/components/esp_lcd/dsi/esp_lcd_mipi_dsi_bus.c @@ -75,7 +75,7 @@ esp_err_t esp_lcd_new_dsi_bus(const esp_lcd_dsi_bus_config_t *bus_config, esp_lc while (!mipi_dsi_phy_ll_is_pll_locked(hal->host)) { vTaskDelay(pdMS_TO_TICKS(1)); } - while (!mipi_dsi_phy_ll_are_lanes_stoped(hal->host)) { + while (!mipi_dsi_phy_ll_are_lanes_stopped(hal->host)) { vTaskDelay(pdMS_TO_TICKS(1)); } diff --git a/components/esp_lcd/dsi/esp_lcd_panel_dpi.c b/components/esp_lcd/dsi/esp_lcd_panel_dpi.c index bd57f1606f..5c6768d371 100644 --- a/components/esp_lcd/dsi/esp_lcd_panel_dpi.c +++ b/components/esp_lcd/dsi/esp_lcd_panel_dpi.c @@ -493,7 +493,7 @@ esp_err_t esp_lcd_dpi_panel_set_pattern(esp_lcd_panel_handle_t panel, mipi_dsi_p mipi_dsi_host_ll_dpi_set_pattern_type(hal->host, pattern); if (pattern == MIPI_DSI_PATTERN_NONE) { - // reenable the DSI bridge to generate the DPI stream + // re-enable the DSI bridge to generate the DPI stream mipi_dsi_brg_ll_enable_dpi_output(hal->bridge, true); mipi_dsi_brg_ll_update_dpi_config(hal->bridge); } diff --git a/components/esp_lcd/i80/esp_lcd_panel_io_i2s.c b/components/esp_lcd/i80/esp_lcd_panel_io_i2s.c index c146c94d0f..3e4e6a1323 100644 --- a/components/esp_lcd/i80/esp_lcd_panel_io_i2s.c +++ b/components/esp_lcd/i80/esp_lcd_panel_io_i2s.c @@ -516,7 +516,7 @@ static esp_err_t panel_io_i80_tx_param(esp_lcd_panel_io_t *io, int lcd_cmd, cons i2s_ll_tx_stop(bus->hal.dev); i2s_ll_tx_reset(bus->hal.dev); // reset TX engine first i2s_ll_start_out_link(bus->hal.dev); - // delay a while, wait for DMA data beeing feed to I2S FIFO + // delay a while, wait for DMA data being feed to I2S FIFO // in fact, this is only needed when LCD pixel clock is set too high esp_rom_delay_us(1); // increase the pm lock reference count before starting a new transaction diff --git a/components/esp_lcd/interface/esp_lcd_panel_interface.h b/components/esp_lcd/interface/esp_lcd_panel_interface.h index d0041ec733..bbcbdcb7b1 100644 --- a/components/esp_lcd/interface/esp_lcd_panel_interface.h +++ b/components/esp_lcd/interface/esp_lcd_panel_interface.h @@ -37,7 +37,7 @@ struct esp_lcd_panel_t { esp_err_t (*init)(esp_lcd_panel_t *panel); /** - * @brief Destory LCD panel + * @brief Destroy LCD panel * * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` * @return diff --git a/components/esp_lcd/interface/esp_lcd_panel_io_interface.h b/components/esp_lcd/interface/esp_lcd_panel_io_interface.h index 88bf9db0d4..781eb1dd3f 100644 --- a/components/esp_lcd/interface/esp_lcd_panel_io_interface.h +++ b/components/esp_lcd/interface/esp_lcd_panel_io_interface.h @@ -66,7 +66,7 @@ struct esp_lcd_panel_io_t { esp_err_t (*tx_color)(esp_lcd_panel_io_t *io, int lcd_cmd, const void *color, size_t color_size); /** - * @brief Destory LCD panel IO handle (deinitialize all and free resource) + * @brief Destroy LCD panel IO handle (deinitialize all and free resource) * * @param[in] io LCD panel IO handle, which is created by other factory API like `esp_lcd_new_panel_io_spi()` * @return diff --git a/components/esp_lcd/rgb/esp_lcd_panel_rgb.c b/components/esp_lcd/rgb/esp_lcd_panel_rgb.c index 0502dbe16d..16d189e0a4 100644 --- a/components/esp_lcd/rgb/esp_lcd_panel_rgb.c +++ b/components/esp_lcd/rgb/esp_lcd_panel_rgb.c @@ -179,7 +179,7 @@ static esp_err_t lcd_rgb_panel_alloc_frame_buffers(const esp_lcd_rgb_panel_confi return ESP_OK; } -static esp_err_t lcd_rgb_panel_destory(esp_rgb_panel_t *rgb_panel) +static esp_err_t lcd_rgb_panel_destroy(esp_rgb_panel_t *rgb_panel) { LCD_CLOCK_SRC_ATOMIC() { lcd_ll_enable_clock(rgb_panel->hal.dev, false); @@ -370,7 +370,7 @@ esp_err_t esp_lcd_new_rgb_panel(const esp_lcd_rgb_panel_config_t *rgb_panel_conf err: if (rgb_panel) { - lcd_rgb_panel_destory(rgb_panel); + lcd_rgb_panel_destroy(rgb_panel); } return ret; } @@ -507,7 +507,7 @@ static esp_err_t rgb_panel_del(esp_lcd_panel_t *panel) { esp_rgb_panel_t *rgb_panel = __containerof(panel, esp_rgb_panel_t, base); int panel_id = rgb_panel->panel_id; - ESP_RETURN_ON_ERROR(lcd_rgb_panel_destory(rgb_panel), TAG, "destroy rgb panel(%d) failed", panel_id); + ESP_RETURN_ON_ERROR(lcd_rgb_panel_destroy(rgb_panel), TAG, "destroy rgb panel(%d) failed", panel_id); ESP_LOGD(TAG, "del rgb panel(%d)", panel_id); return ESP_OK; } @@ -918,7 +918,7 @@ static IRAM_ATTR bool lcd_rgb_panel_fill_bounce_buffer(esp_rgb_panel_t *panel, u } } else { // We do have frame buffer; copy from there. - // Note: if the cache is diabled, and accessing the PSRAM by DCACHE will crash. + // Note: if the cache is disabled, and accessing the PSRAM by DCACHE will crash. memcpy(buffer, &panel->fbs[panel->bb_fb_index][panel->bounce_pos_px * bytes_per_pixel], panel->bb_size); if (panel->flags.bb_invalidate_cache) { // We don't need the bytes we copied from the psram anymore @@ -1091,7 +1091,7 @@ static IRAM_ATTR void lcd_rgb_panel_try_restart_transmission(esp_rgb_panel_t *pa static void lcd_rgb_panel_start_transmission(esp_rgb_panel_t *rgb_panel) { - // reset FIFO of DMA and LCD, incase there remains old frame data + // reset FIFO of DMA and LCD, in case there remains old frame data gdma_reset(rgb_panel->dma_chan); lcd_ll_stop(rgb_panel->hal.dev); lcd_ll_fifo_reset(rgb_panel->hal.dev); diff --git a/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h b/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h index 3b0bdbb933..7cd4c690b7 100644 --- a/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h +++ b/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h @@ -39,7 +39,7 @@ extern "C" { * Total | | | |/ / / / / / / / / / / / / / / / / / / /| | * Height | | | |/ / / / / / / / / / / / / / / / / / / /| | * |Active| | |/ / / / / / / / / / / / / / / / / / / /| | - * |Heigh | | |/ / / / / / Active Display Area / / / /| | + * |Height| | |/ / / / / / Active Display Area / / / /| | * | | | |/ / / / / / / / / / / / / / / / / / / /| | * | | | |/ / / / / / / / / / / / / / / / / / / /| | * | | | |/ / / / / / / / / / / / / / / / / / / /| | diff --git a/components/hal/esp32p4/include/hal/jpeg_ll.h b/components/hal/esp32p4/include/hal/jpeg_ll.h index 05b3f3ebf2..f84f6d0a02 100644 --- a/components/hal/esp32p4/include/hal/jpeg_ll.h +++ b/components/hal/esp32p4/include/hal/jpeg_ll.h @@ -43,7 +43,7 @@ typedef enum { JPEG_LL_INTR_SOS_UNMATCH_ERR = (1 << 20), JPEG_LL_INTR_MARKER_ERR_FST = (1 << 21), JPEG_LL_INTR_MARKER_ERR_OTHER = (1 << 22), - JPEG_LL_INTR_UNDET = (1 << 23), + JPEG_LL_INTR_UNDETECT = (1 << 23), JPEG_LL_INTR_DECODE_TIMEOUT = (1 << 24), } jpeg_ll_decoder_intr_t; @@ -63,7 +63,7 @@ typedef enum { JPEG_LL_INTR_SOS_UNMATCH_ERR | \ JPEG_LL_INTR_MARKER_ERR_FST | \ JPEG_LL_INTR_MARKER_ERR_OTHER | \ - JPEG_LL_INTR_UNDET | \ + JPEG_LL_INTR_UNDETECT | \ JPEG_LL_INTR_DECODE_TIMEOUT) @@ -530,7 +530,7 @@ static inline void jpeg_ll_pixel_reverse(jpeg_dev_t *hw, bool reverse_en) * @brief Configures whether or not to add EOI of “0xffd9” at the end of bitstream * * @param hw Pointer to JPEG hardware. - * @param tailer_en 1: Add `0xffd9` at the end ot bitstream. + * @param tailer_en 1: Add `0xffd9` at the end of bitstream. */ static inline void jpeg_ll_add_tail(jpeg_dev_t *hw, bool tailer_en) { diff --git a/components/hal/esp32p4/include/hal/mipi_dsi_phy_ll.h b/components/hal/esp32p4/include/hal/mipi_dsi_phy_ll.h index a38ce30747..b89de14d87 100644 --- a/components/hal/esp32p4/include/hal/mipi_dsi_phy_ll.h +++ b/components/hal/esp32p4/include/hal/mipi_dsi_phy_ll.h @@ -83,7 +83,7 @@ static inline bool mipi_dsi_phy_ll_is_pll_locked(dsi_host_dev_t *dev) * @param dev Pointer to the DSI Host controller register base address * @return True if the lanes are all in stop state, False otherwise */ -static inline bool mipi_dsi_phy_ll_are_lanes_stoped(dsi_host_dev_t *dev) +static inline bool mipi_dsi_phy_ll_are_lanes_stopped(dsi_host_dev_t *dev) { uint32_t status = dev->phy_status.val; const uint32_t mask = 1 << 2 | 1 << 4 | 1 << 7;