unity_utils: added helper function to disable cache and run user function

This commit is contained in:
morris
2022-08-06 14:52:22 +08:00
parent cdd50aff1a
commit f24983a942
14 changed files with 99 additions and 94 deletions

View File

@@ -0,0 +1,25 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Disable flash cache and run user stub function and then enable flash cache again
*
* @note You should make sure the passed-in function is in internal RAM.
*
* @param post_cache_disable User function to be invoked after cache is disabled.
* @param user_ctx User context to be passed to user function.
*/
void unity_utils_run_cache_disable_stub(void (*post_cache_disable)(void *), void *user_ctx);
#ifdef __cplusplus
}
#endif