mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
mcpwm: modify wrong config name
This commit is contained in:
parent
770961d2b8
commit
8cc6a535b2
@ -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
|
||||
*/
|
||||
@ -354,7 +354,7 @@ esp_err_t mcpwm_capture_channel_register_event_callbacks(mcpwm_cap_channel_handl
|
||||
int group_id = group->group_id;
|
||||
int cap_chan_id = cap_channel->cap_chan_id;
|
||||
|
||||
#if CONFIG_MCWPM_ISR_IRAM_SAFE
|
||||
#if CONFIG_MCPWM_ISR_IRAM_SAFE
|
||||
if (cbs->on_cap) {
|
||||
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_cap), ESP_ERR_INVALID_ARG, TAG, "on_cap callback not in IRAM");
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
@ -149,7 +149,7 @@ esp_err_t mcpwm_comparator_register_event_callbacks(mcpwm_cmpr_handle_t cmpr, co
|
||||
int oper_id = oper->oper_id;
|
||||
int cmpr_id = cmpr->cmpr_id;
|
||||
|
||||
#if CONFIG_MCWPM_ISR_IRAM_SAFE
|
||||
#if CONFIG_MCPWM_ISR_IRAM_SAFE
|
||||
if (cbs->on_reach) {
|
||||
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_reach), ESP_ERR_INVALID_ARG, TAG, "on_reach callback not in IRAM");
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
@ -229,7 +229,7 @@ esp_err_t mcpwm_fault_register_event_callbacks(mcpwm_fault_handle_t fault, const
|
||||
mcpwm_hal_context_t *hal = &group->hal;
|
||||
int fault_id = gpio_fault->fault_id;
|
||||
|
||||
#if CONFIG_MCWPM_ISR_IRAM_SAFE
|
||||
#if CONFIG_MCPWM_ISR_IRAM_SAFE
|
||||
if (cbs->on_fault_enter) {
|
||||
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_fault_enter), ESP_ERR_INVALID_ARG, TAG, "on_fault_enter callback not in IRAM");
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
@ -219,7 +219,7 @@ esp_err_t mcpwm_operator_register_event_callbacks(mcpwm_oper_handle_t oper, cons
|
||||
int group_id = group->group_id;
|
||||
int oper_id = oper->oper_id;
|
||||
|
||||
#if CONFIG_MCWPM_ISR_IRAM_SAFE
|
||||
#if CONFIG_MCPWM_ISR_IRAM_SAFE
|
||||
if (cbs->on_brake_cbc) {
|
||||
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_brake_cbc), ESP_ERR_INVALID_ARG, TAG, "on_brake_cbc callback not in IRAM");
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
@ -171,7 +171,7 @@ esp_err_t mcpwm_timer_register_event_callbacks(mcpwm_timer_handle_t timer, const
|
||||
int timer_id = timer->timer_id;
|
||||
mcpwm_hal_context_t *hal = &group->hal;
|
||||
|
||||
#if CONFIG_MCWPM_ISR_IRAM_SAFE
|
||||
#if CONFIG_MCPWM_ISR_IRAM_SAFE
|
||||
if (cbs->on_empty) {
|
||||
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_empty), ESP_ERR_INVALID_ARG, TAG, "on_empty callback not in IRAM");
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
@ -52,7 +52,7 @@ TEST_CASE("mcpwm_comparator_install_uninstall", "[mcpwm]")
|
||||
TEST_ESP_OK(mcpwm_del_timer(timer));
|
||||
}
|
||||
|
||||
static bool test_compare_on_reach(mcpwm_cmpr_handle_t cmpr, const mcpwm_compare_event_data_t *ev_data, void *user_data)
|
||||
static bool IRAM_ATTR test_compare_on_reach(mcpwm_cmpr_handle_t cmpr, const mcpwm_compare_event_data_t *ev_data, void *user_data)
|
||||
{
|
||||
uint32_t *counts = (uint32_t *)user_data;
|
||||
(*counts)++;
|
||||
|
@ -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
|
||||
*/
|
||||
@ -37,7 +37,7 @@ TEST_CASE("mcpwm_fault_install_uninstall", "[mcpwm]")
|
||||
TEST_ESP_OK(mcpwm_del_fault(soft_fault));
|
||||
}
|
||||
|
||||
static bool test_fault_enter_callback(mcpwm_fault_handle_t detector, const mcpwm_fault_event_data_t *status, void *user_data)
|
||||
static bool IRAM_ATTR test_fault_enter_callback(mcpwm_fault_handle_t detector, const mcpwm_fault_event_data_t *status, void *user_data)
|
||||
{
|
||||
TaskHandle_t task_handle = (TaskHandle_t)user_data;
|
||||
BaseType_t high_task_wakeup = pdFALSE;
|
||||
@ -46,7 +46,7 @@ static bool test_fault_enter_callback(mcpwm_fault_handle_t detector, const mcpwm
|
||||
return high_task_wakeup == pdTRUE;
|
||||
}
|
||||
|
||||
static bool test_fault_exit_callback(mcpwm_fault_handle_t detector, const mcpwm_fault_event_data_t *status, void *user_data)
|
||||
static bool IRAM_ATTR test_fault_exit_callback(mcpwm_fault_handle_t detector, const mcpwm_fault_event_data_t *status, void *user_data)
|
||||
{
|
||||
TaskHandle_t task_handle = (TaskHandle_t)user_data;
|
||||
BaseType_t high_task_wakeup = pdFALSE;
|
||||
|
@ -119,13 +119,13 @@ TEST_CASE("mcpwm_operator_carrier", "[mcpwm]")
|
||||
TEST_ESP_OK(mcpwm_del_timer(timer));
|
||||
}
|
||||
|
||||
static bool test_cbc_brake_on_gpio_fault_callback(mcpwm_oper_handle_t oper, const mcpwm_brake_event_data_t *edata, void *user_data)
|
||||
static bool IRAM_ATTR test_cbc_brake_on_gpio_fault_callback(mcpwm_oper_handle_t oper, const mcpwm_brake_event_data_t *edata, void *user_data)
|
||||
{
|
||||
esp_rom_printf("cbc brake\r\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool test_ost_brake_on_gpio_fault_callback(mcpwm_oper_handle_t oper, const mcpwm_brake_event_data_t *edata, void *user_data)
|
||||
static bool IRAM_ATTR test_ost_brake_on_gpio_fault_callback(mcpwm_oper_handle_t oper, const mcpwm_brake_event_data_t *edata, void *user_data)
|
||||
{
|
||||
esp_rom_printf("ost brake\r\n");
|
||||
return false;
|
||||
|
@ -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
|
||||
*/
|
||||
@ -100,7 +100,7 @@ typedef struct {
|
||||
uint32_t accumulate_empty_counts;
|
||||
} test_mcpwm_timer_user_data_t;
|
||||
|
||||
static bool test_on_stop(mcpwm_timer_handle_t timer, const mcpwm_timer_event_data_t *edata, void *user_data)
|
||||
IRAM_ATTR static bool test_on_stop(mcpwm_timer_handle_t timer, const mcpwm_timer_event_data_t *edata, void *user_data)
|
||||
{
|
||||
test_mcpwm_timer_user_data_t *udata = (test_mcpwm_timer_user_data_t *)user_data;
|
||||
BaseType_t high_task_wakeup = pdFALSE;
|
||||
@ -110,7 +110,7 @@ static bool test_on_stop(mcpwm_timer_handle_t timer, const mcpwm_timer_event_dat
|
||||
return high_task_wakeup == pdTRUE;
|
||||
}
|
||||
|
||||
static bool test_on_full(mcpwm_timer_handle_t timer, const mcpwm_timer_event_data_t *edata, void *user_data)
|
||||
IRAM_ATTR static bool test_on_full(mcpwm_timer_handle_t timer, const mcpwm_timer_event_data_t *edata, void *user_data)
|
||||
{
|
||||
test_mcpwm_timer_user_data_t *udata = (test_mcpwm_timer_user_data_t *)user_data;
|
||||
BaseType_t high_task_wakeup = pdFALSE;
|
||||
@ -122,7 +122,7 @@ static bool test_on_full(mcpwm_timer_handle_t timer, const mcpwm_timer_event_dat
|
||||
return high_task_wakeup == pdTRUE;
|
||||
}
|
||||
|
||||
static bool test_on_empty(mcpwm_timer_handle_t timer, const mcpwm_timer_event_data_t *edata, void *user_data)
|
||||
IRAM_ATTR static bool test_on_empty(mcpwm_timer_handle_t timer, const mcpwm_timer_event_data_t *edata, void *user_data)
|
||||
{
|
||||
test_mcpwm_timer_user_data_t *udata = (test_mcpwm_timer_user_data_t *)user_data;
|
||||
BaseType_t high_task_wakeup = pdFALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user