diff --git a/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h b/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h index 3664da9e9b..970b0a878c 100644 --- a/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h +++ b/components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -52,26 +52,6 @@ static inline uint32_t ulp_lp_core_get_cpu_cycles(void) return RV_READ_CSR(mcycle); } -/** - * @brief Check whether an mcycle-based timeout has elapsed. - * - * @note A timeout value of -1 means "wait forever". - * Other values are interpreted as unsigned cycle counts. - * - * @param start_cycle_count Cycle counter value captured at timeout start. - * @param cycles_to_wait Timeout in CPU cycles, or -1 to disable timeout. - * - * @return true if timeout elapsed, false otherwise. - */ -static inline bool ulp_lp_core_is_timeout_elapsed(uint32_t start_cycle_count, int32_t cycles_to_wait) -{ - if (cycles_to_wait == -1) { - return false; - } - - return (ulp_lp_core_get_cpu_cycles() - start_cycle_count) >= (uint32_t)cycles_to_wait; -} - /** * @brief Makes the co-processor busy-wait for a certain number of microseconds. *