From d9f82baca728600a68c515febad3c290b517b5cc Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 16 Feb 2023 16:33:42 +0800 Subject: [PATCH] driver: fix typo "destroy" --- components/driver/gptimer/gptimer.c | 6 +++--- components/driver/mcpwm/mcpwm_cap.c | 12 ++++++------ components/driver/mcpwm/mcpwm_cmpr.c | 6 +++--- components/driver/mcpwm/mcpwm_fault.c | 6 +++--- components/driver/mcpwm/mcpwm_gen.c | 6 +++--- components/driver/mcpwm/mcpwm_oper.c | 6 +++--- components/driver/mcpwm/mcpwm_sync.c | 14 +++++++------- components/driver/mcpwm/mcpwm_timer.c | 6 +++--- components/driver/pcnt/pulse_cnt.c | 6 +++--- components/driver/rmt/rmt_rx.c | 8 ++++---- components/driver/rmt/rmt_tx.c | 8 ++++---- components/driver/sigma_delta/sdm.c | 6 +++--- 12 files changed, 45 insertions(+), 45 deletions(-) diff --git a/components/driver/gptimer/gptimer.c b/components/driver/gptimer/gptimer.c index f58531c2fd..2e30850431 100644 --- a/components/driver/gptimer/gptimer.c +++ b/components/driver/gptimer/gptimer.c @@ -87,7 +87,7 @@ static void gptimer_unregister_from_group(gptimer_t *timer) gptimer_release_group_handle(group); } -static esp_err_t gptimer_destory(gptimer_t *timer) +static esp_err_t gptimer_destroy(gptimer_t *timer) { if (timer->pm_lock) { ESP_RETURN_ON_ERROR(esp_pm_lock_delete(timer->pm_lock), TAG, "delete pm_lock failed"); @@ -145,7 +145,7 @@ esp_err_t gptimer_new_timer(const gptimer_config_t *config, gptimer_handle_t *re err: if (timer) { - gptimer_destory(timer); + gptimer_destroy(timer); } return ret; } @@ -161,7 +161,7 @@ esp_err_t gptimer_del_timer(gptimer_handle_t timer) ESP_LOGD(TAG, "del timer (%d,%d)", group_id, timer_id); timer_hal_deinit(&timer->hal); // recycle memory resource - ESP_RETURN_ON_ERROR(gptimer_destory(timer), TAG, "destory gptimer failed"); + ESP_RETURN_ON_ERROR(gptimer_destroy(timer), TAG, "destroy gptimer failed"); switch (clk_src) { #if SOC_TIMER_GROUP_SUPPORT_RC_FAST diff --git a/components/driver/mcpwm/mcpwm_cap.c b/components/driver/mcpwm/mcpwm_cap.c index 97f29682c5..8ff7910bd9 100644 --- a/components/driver/mcpwm/mcpwm_cap.c +++ b/components/driver/mcpwm/mcpwm_cap.c @@ -66,7 +66,7 @@ static void mcpwm_cap_timer_unregister_from_group(mcpwm_cap_timer_t *cap_timer) mcpwm_release_group_handle(group); } -static esp_err_t mcpwm_cap_timer_destory(mcpwm_cap_timer_t *cap_timer) +static esp_err_t mcpwm_cap_timer_destroy(mcpwm_cap_timer_t *cap_timer) { if (cap_timer->pm_lock) { ESP_RETURN_ON_ERROR(esp_pm_lock_delete(cap_timer->pm_lock), TAG, "delete pm_lock failed"); @@ -124,7 +124,7 @@ esp_err_t mcpwm_new_capture_timer(const mcpwm_capture_timer_config_t *config, mc err: if (cap_timer) { - mcpwm_cap_timer_destory(cap_timer); + mcpwm_cap_timer_destroy(cap_timer); } return ret; } @@ -140,7 +140,7 @@ esp_err_t mcpwm_del_capture_timer(mcpwm_cap_timer_handle_t cap_timer) ESP_LOGD(TAG, "del capture timer in group %d", group->group_id); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_cap_timer_destory(cap_timer), TAG, "destory capture timer failed"); + ESP_RETURN_ON_ERROR(mcpwm_cap_timer_destroy(cap_timer), TAG, "destroy capture timer failed"); return ESP_OK; } @@ -228,7 +228,7 @@ static void mcpwm_capture_channel_unregister_from_timer(mcpwm_cap_channel_t *cap portEXIT_CRITICAL(&cap_timer->spinlock); } -static esp_err_t mcpwm_capture_channel_destory(mcpwm_cap_channel_t *cap_chan) +static esp_err_t mcpwm_capture_channel_destroy(mcpwm_cap_channel_t *cap_chan) { if (cap_chan->intr) { ESP_RETURN_ON_ERROR(esp_intr_free(cap_chan->intr), TAG, "delete interrupt service failed"); @@ -282,7 +282,7 @@ esp_err_t mcpwm_new_capture_channel(mcpwm_cap_timer_handle_t cap_timer, const mc return ESP_OK; err: if (cap_chan) { - mcpwm_capture_channel_destory(cap_chan); + mcpwm_capture_channel_destroy(cap_chan); } return ret; } @@ -307,7 +307,7 @@ esp_err_t mcpwm_del_capture_channel(mcpwm_cap_channel_handle_t cap_channel) portEXIT_CRITICAL(&group->spinlock); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_capture_channel_destory(cap_channel), TAG, "destory capture channel failed"); + ESP_RETURN_ON_ERROR(mcpwm_capture_channel_destroy(cap_channel), TAG, "destroy capture channel failed"); return ESP_OK; } diff --git a/components/driver/mcpwm/mcpwm_cmpr.c b/components/driver/mcpwm/mcpwm_cmpr.c index 29c35003a5..fd0c1fd061 100644 --- a/components/driver/mcpwm/mcpwm_cmpr.c +++ b/components/driver/mcpwm/mcpwm_cmpr.c @@ -58,7 +58,7 @@ static void mcpwm_comparator_unregister_from_operator(mcpwm_cmpr_t *cmpr) portEXIT_CRITICAL(&oper->spinlock); } -static esp_err_t mcpwm_comparator_destory(mcpwm_cmpr_t *cmpr) +static esp_err_t mcpwm_comparator_destroy(mcpwm_cmpr_t *cmpr) { if (cmpr->intr) { ESP_RETURN_ON_ERROR(esp_intr_free(cmpr->intr), TAG, "uninstall interrupt service failed"); @@ -97,7 +97,7 @@ esp_err_t mcpwm_new_comparator(mcpwm_oper_handle_t oper, const mcpwm_comparator_ err: if (cmpr) { - mcpwm_comparator_destory(cmpr); + mcpwm_comparator_destroy(cmpr); } return ret; } @@ -118,7 +118,7 @@ esp_err_t mcpwm_del_comparator(mcpwm_cmpr_handle_t cmpr) ESP_LOGD(TAG, "del comparator (%d,%d,%d)", group->group_id, oper_id, cmpr_id); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_comparator_destory(cmpr), TAG, "destory comparator failed"); + ESP_RETURN_ON_ERROR(mcpwm_comparator_destroy(cmpr), TAG, "destroy comparator failed"); return ESP_OK; } diff --git a/components/driver/mcpwm/mcpwm_fault.c b/components/driver/mcpwm/mcpwm_fault.c index f659b0909f..4ec4b13ca3 100644 --- a/components/driver/mcpwm/mcpwm_fault.c +++ b/components/driver/mcpwm/mcpwm_fault.c @@ -71,7 +71,7 @@ static void mcpwm_gpio_fault_unregister_from_group(mcpwm_gpio_fault_t *fault) mcpwm_release_group_handle(group); } -static esp_err_t mcpwm_gpio_fault_destory(mcpwm_gpio_fault_t *fault) +static esp_err_t mcpwm_gpio_fault_destroy(mcpwm_gpio_fault_t *fault) { if (fault->intr) { ESP_RETURN_ON_ERROR(esp_intr_free(fault->intr), TAG, "uninstall interrupt service failed"); @@ -133,7 +133,7 @@ esp_err_t mcpwm_new_gpio_fault(const mcpwm_gpio_fault_config_t *config, mcpwm_fa err: if (fault) { - mcpwm_gpio_fault_destory(fault); + mcpwm_gpio_fault_destroy(fault); } return ret; } @@ -157,7 +157,7 @@ static esp_err_t mcpwm_del_gpio_fault(mcpwm_fault_handle_t fault) mcpwm_ll_fault_enable_detection(hal->dev, fault_id, false); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_gpio_fault_destory(gpio_fault), TAG, "destory GPIO fault failed"); + ESP_RETURN_ON_ERROR(mcpwm_gpio_fault_destroy(gpio_fault), TAG, "destroy GPIO fault failed"); return ESP_OK; } diff --git a/components/driver/mcpwm/mcpwm_gen.c b/components/driver/mcpwm/mcpwm_gen.c index e3678169a3..fdd57c08ed 100644 --- a/components/driver/mcpwm/mcpwm_gen.c +++ b/components/driver/mcpwm/mcpwm_gen.c @@ -56,7 +56,7 @@ static void mcpwm_generator_unregister_from_operator(mcpwm_gen_t *gen) portEXIT_CRITICAL(&oper->spinlock); } -static esp_err_t mcpwm_generator_destory(mcpwm_gen_t *gen) +static esp_err_t mcpwm_generator_destroy(mcpwm_gen_t *gen) { if (gen->oper) { mcpwm_generator_unregister_from_operator(gen); @@ -105,7 +105,7 @@ esp_err_t mcpwm_new_generator(mcpwm_oper_handle_t oper, const mcpwm_generator_co err: if (gen) { - mcpwm_generator_destory(gen); + mcpwm_generator_destroy(gen); } return ret; } @@ -118,7 +118,7 @@ esp_err_t mcpwm_del_generator(mcpwm_gen_handle_t gen) ESP_LOGD(TAG, "del generator (%d,%d,%d)", group->group_id, oper->oper_id, gen->gen_id); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_generator_destory(gen), TAG, "destory generator failed"); + ESP_RETURN_ON_ERROR(mcpwm_generator_destroy(gen), TAG, "destroy generator failed"); return ESP_OK; } diff --git a/components/driver/mcpwm/mcpwm_oper.c b/components/driver/mcpwm/mcpwm_oper.c index a01ccb033f..2053f4b81e 100644 --- a/components/driver/mcpwm/mcpwm_oper.c +++ b/components/driver/mcpwm/mcpwm_oper.c @@ -68,7 +68,7 @@ static void mcpwm_operator_unregister_from_group(mcpwm_oper_t *oper) mcpwm_release_group_handle(group); } -static esp_err_t mcpwm_operator_destory(mcpwm_oper_t *oper) +static esp_err_t mcpwm_operator_destroy(mcpwm_oper_t *oper) { if (oper->intr) { ESP_RETURN_ON_ERROR(esp_intr_free(oper->intr), TAG, "uninstall interrupt service failed"); @@ -123,7 +123,7 @@ esp_err_t mcpwm_new_operator(const mcpwm_operator_config_t *config, mcpwm_oper_h err: if (oper) { - mcpwm_operator_destory(oper); + mcpwm_operator_destroy(oper); } return ret; } @@ -149,7 +149,7 @@ esp_err_t mcpwm_del_operator(mcpwm_oper_handle_t oper) ESP_LOGD(TAG, "del operator (%d,%d)", group->group_id, oper_id); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_operator_destory(oper), TAG, "destory operator failed"); + ESP_RETURN_ON_ERROR(mcpwm_operator_destroy(oper), TAG, "destroy operator failed"); return ESP_OK; } diff --git a/components/driver/mcpwm/mcpwm_sync.c b/components/driver/mcpwm/mcpwm_sync.c index c8b7e1bcc3..dede456adc 100644 --- a/components/driver/mcpwm/mcpwm_sync.c +++ b/components/driver/mcpwm/mcpwm_sync.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -57,7 +57,7 @@ static void mcpwm_timer_sync_src_unregister_from_timer(mcpwm_timer_sync_src_t *t portEXIT_CRITICAL(&timer->spinlock); } -static esp_err_t mcpwm_timer_sync_src_destory(mcpwm_timer_sync_src_t *timer_sync_src) +static esp_err_t mcpwm_timer_sync_src_destroy(mcpwm_timer_sync_src_t *timer_sync_src) { if (timer_sync_src->timer) { mcpwm_timer_sync_src_unregister_from_timer(timer_sync_src); @@ -104,7 +104,7 @@ esp_err_t mcpwm_new_timer_sync_src(mcpwm_timer_handle_t timer, const mcpwm_timer err: if (timer_sync_src) { - mcpwm_timer_sync_src_destory(timer_sync_src); + mcpwm_timer_sync_src_destroy(timer_sync_src); } return ret; } @@ -118,7 +118,7 @@ static esp_err_t mcpwm_del_timer_sync_src(mcpwm_sync_t *sync_src) mcpwm_ll_timer_disable_sync_out(group->hal.dev, timer_id); ESP_LOGD(TAG, "del timer sync_src in timer (%d,%d)", group->group_id, timer_id); - ESP_RETURN_ON_ERROR(mcpwm_timer_sync_src_destory(timer_sync_src), TAG, "destory timer sync_src failed"); + ESP_RETURN_ON_ERROR(mcpwm_timer_sync_src_destroy(timer_sync_src), TAG, "destroy timer sync_src failed"); return ESP_OK; } @@ -163,7 +163,7 @@ static void mcpwm_gpio_sync_src_unregister_from_group(mcpwm_gpio_sync_src_t *gpi mcpwm_release_group_handle(group); } -static esp_err_t mcpwm_gpio_sync_src_destory(mcpwm_gpio_sync_src_t *gpio_sync_src) +static esp_err_t mcpwm_gpio_sync_src_destroy(mcpwm_gpio_sync_src_t *gpio_sync_src) { if (gpio_sync_src->base.group) { mcpwm_gpio_sync_src_unregister_from_group(gpio_sync_src); @@ -217,7 +217,7 @@ esp_err_t mcpwm_new_gpio_sync_src(const mcpwm_gpio_sync_src_config_t *config, mc err: if (gpio_sync_src) { - mcpwm_gpio_sync_src_destory(gpio_sync_src); + mcpwm_gpio_sync_src_destroy(gpio_sync_src); } return ret; } @@ -231,7 +231,7 @@ static esp_err_t mcpwm_del_gpio_sync_src(mcpwm_sync_t *sync_src) gpio_reset_pin(gpio_sync_src->gpio_num); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_gpio_sync_src_destory(gpio_sync_src), TAG, "destory GPIO sync_src failed"); + ESP_RETURN_ON_ERROR(mcpwm_gpio_sync_src_destroy(gpio_sync_src), TAG, "destroy GPIO sync_src failed"); return ESP_OK; } diff --git a/components/driver/mcpwm/mcpwm_timer.c b/components/driver/mcpwm/mcpwm_timer.c index e9e9d0dd4f..710b0716f5 100644 --- a/components/driver/mcpwm/mcpwm_timer.c +++ b/components/driver/mcpwm/mcpwm_timer.c @@ -69,7 +69,7 @@ static void mcpwm_timer_unregister_from_group(mcpwm_timer_t *timer) mcpwm_release_group_handle(group); } -static esp_err_t mcpwm_timer_destory(mcpwm_timer_t *timer) +static esp_err_t mcpwm_timer_destroy(mcpwm_timer_t *timer) { if (timer->intr) { ESP_RETURN_ON_ERROR(esp_intr_free(timer->intr), TAG, "uninstall interrupt service failed"); @@ -136,7 +136,7 @@ esp_err_t mcpwm_new_timer(const mcpwm_timer_config_t *config, mcpwm_timer_handle err: if (timer) { - mcpwm_timer_destory(timer); + mcpwm_timer_destroy(timer); } return ret; } @@ -159,7 +159,7 @@ esp_err_t mcpwm_del_timer(mcpwm_timer_handle_t timer) ESP_LOGD(TAG, "del timer (%d,%d)", group->group_id, timer_id); // recycle memory resource - ESP_RETURN_ON_ERROR(mcpwm_timer_destory(timer), TAG, "destory timer failed"); + ESP_RETURN_ON_ERROR(mcpwm_timer_destroy(timer), TAG, "destroy timer failed"); return ESP_OK; } diff --git a/components/driver/pcnt/pulse_cnt.c b/components/driver/pcnt/pulse_cnt.c index f3a68c9ee5..700ce4eeb2 100644 --- a/components/driver/pcnt/pulse_cnt.c +++ b/components/driver/pcnt/pulse_cnt.c @@ -155,7 +155,7 @@ static void pcnt_unregister_from_group(pcnt_unit_t *unit) pcnt_release_group_handle(group); } -static esp_err_t pcnt_destory(pcnt_unit_t *unit) +static esp_err_t pcnt_destroy(pcnt_unit_t *unit) { if (unit->pm_lock) { ESP_RETURN_ON_ERROR(esp_pm_lock_delete(unit->pm_lock), TAG, "delete pm lock failed"); @@ -233,7 +233,7 @@ esp_err_t pcnt_new_unit(const pcnt_unit_config_t *config, pcnt_unit_handle_t *re err: if (unit) { - pcnt_destory(unit); + pcnt_destroy(unit); } return ret; } @@ -252,7 +252,7 @@ esp_err_t pcnt_del_unit(pcnt_unit_handle_t unit) ESP_LOGD(TAG, "del unit (%d,%d)", group_id, unit_id); // recycle memory resource - ESP_RETURN_ON_ERROR(pcnt_destory(unit), TAG, "destory pcnt unit failed"); + ESP_RETURN_ON_ERROR(pcnt_destroy(unit), TAG, "destroy pcnt unit failed"); return ESP_OK; } diff --git a/components/driver/rmt/rmt_rx.c b/components/driver/rmt/rmt_rx.c index 9dc3a94d5a..c861e42c02 100644 --- a/components/driver/rmt/rmt_rx.c +++ b/components/driver/rmt/rmt_rx.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -155,7 +155,7 @@ static void rmt_rx_unregister_from_group(rmt_channel_t *channel, rmt_group_t *gr rmt_release_group_handle(group); } -static esp_err_t rmt_rx_destory(rmt_rx_channel_t *rx_channel) +static esp_err_t rmt_rx_destroy(rmt_rx_channel_t *rx_channel) { if (rx_channel->base.intr) { ESP_RETURN_ON_ERROR(esp_intr_free(rx_channel->base.intr), TAG, "delete interrupt service failed"); @@ -289,7 +289,7 @@ esp_err_t rmt_new_rx_channel(const rmt_rx_channel_config_t *config, rmt_channel_ err: if (rx_channel) { - rmt_rx_destory(rx_channel); + rmt_rx_destroy(rx_channel); } return ret; } @@ -302,7 +302,7 @@ static esp_err_t rmt_del_rx_channel(rmt_channel_handle_t channel) int channel_id = channel->channel_id; ESP_LOGD(TAG, "del rx channel(%d,%d)", group_id, channel_id); // recycle memory resource - ESP_RETURN_ON_ERROR(rmt_rx_destory(rx_chan), TAG, "destory rx channel failed"); + ESP_RETURN_ON_ERROR(rmt_rx_destroy(rx_chan), TAG, "destroy rx channel failed"); return ESP_OK; } diff --git a/components/driver/rmt/rmt_tx.c b/components/driver/rmt/rmt_tx.c index 5d814a515a..7a35f430cc 100644 --- a/components/driver/rmt/rmt_tx.c +++ b/components/driver/rmt/rmt_tx.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -166,7 +166,7 @@ static esp_err_t rmt_tx_create_trans_queue(rmt_tx_channel_t *tx_channel, const r return ESP_OK; } -static esp_err_t rmt_tx_destory(rmt_tx_channel_t *tx_channel) +static esp_err_t rmt_tx_destroy(rmt_tx_channel_t *tx_channel) { if (tx_channel->base.intr) { ESP_RETURN_ON_ERROR(esp_intr_free(tx_channel->base.intr), TAG, "delete interrupt service failed"); @@ -307,7 +307,7 @@ esp_err_t rmt_new_tx_channel(const rmt_tx_channel_config_t *config, rmt_channel_ err: if (tx_channel) { - rmt_tx_destory(tx_channel); + rmt_tx_destroy(tx_channel); } return ret; } @@ -320,7 +320,7 @@ static esp_err_t rmt_del_tx_channel(rmt_channel_handle_t channel) int channel_id = channel->channel_id; ESP_LOGD(TAG, "del tx channel(%d,%d)", group_id, channel_id); // recycle memory resource - ESP_RETURN_ON_ERROR(rmt_tx_destory(tx_chan), TAG, "destory tx channel failed"); + ESP_RETURN_ON_ERROR(rmt_tx_destroy(tx_chan), TAG, "destroy tx channel failed"); return ESP_OK; } diff --git a/components/driver/sigma_delta/sdm.c b/components/driver/sigma_delta/sdm.c index 5609554fdf..1eaa9bd5c1 100644 --- a/components/driver/sigma_delta/sdm.c +++ b/components/driver/sigma_delta/sdm.c @@ -177,7 +177,7 @@ static void sdm_unregister_from_group(sdm_channel_t *chan) sdm_release_group_handle(group); } -static esp_err_t sdm_destory(sdm_channel_t *chan) +static esp_err_t sdm_destroy(sdm_channel_t *chan) { if (chan->pm_lock) { ESP_RETURN_ON_ERROR(esp_pm_lock_delete(chan->pm_lock), TAG, "delete pm lock failed"); @@ -283,7 +283,7 @@ esp_err_t sdm_new_channel(const sdm_config_t *config, sdm_channel_handle_t *ret_ return ESP_OK; err: if (chan) { - sdm_destory(chan); + sdm_destroy(chan); } return ret; } @@ -297,7 +297,7 @@ esp_err_t sdm_del_channel(sdm_channel_handle_t chan) int chan_id = chan->chan_id; ESP_LOGD(TAG, "del channel (%d,%d)", group_id, chan_id); // recycle memory resource - ESP_RETURN_ON_ERROR(sdm_destory(chan), TAG, "destory channel failed"); + ESP_RETURN_ON_ERROR(sdm_destroy(chan), TAG, "destroy channel failed"); return ESP_OK; }