mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-28 11:28:43 +00:00
16 lines
443 B
C
16 lines
443 B
C
/*
|
|
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#pragma once
|
|
|
|
#if CONFIG_NVS_ASSERT_ERROR_CHECK
|
|
#define NVS_ASSERT_OR_RETURN(condition, retcode) assert(condition);
|
|
#else
|
|
#define NVS_ASSERT_OR_RETURN(condition, retcode) \
|
|
if (!(condition)) { \
|
|
return retcode; \
|
|
}
|
|
#endif // CONFIG_NVS_ASSERT_ERROR_CHECK
|