nvs_internal.h 497 B

123456789101112131415161718
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef NVS_INTERNAL_H
  7. #define NVS_INTERNAL_H
  8. #if CONFIG_NVS_ASSERT_ERROR_CHECK
  9. #define NVS_ASSERT_OR_RETURN(condition, retcode) assert(condition);
  10. #else
  11. #define NVS_ASSERT_OR_RETURN(condition, retcode) \
  12. if (!(condition)) { \
  13. return retcode; \
  14. }
  15. #endif // CONFIG_NVS_ASSERT_ERROR_CHECK
  16. #endif // NVS_INTERNAL_H