1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: NV Storage Library debug 15 */ 16 17 #ifndef NV_DEBUG_H 18 #define NV_DEBUG_H 19 20 #include "stdint.h" 21 #include "errcode.h" 22 23 #ifdef __cplusplus 24 #if __cplusplus 25 extern "C" { 26 #endif /* __cplusplus */ 27 #endif /* __cplusplus */ 28 29 #define NV_LOG_LEVEL_ALERT 0 30 #define NV_LOG_LEVEL_FATAL 1 31 #define NV_LOG_LEVEL_ERROR 2 32 #define NV_LOG_LEVEL_WARN 3 33 #define NV_LOG_LEVEL_NOTICE 4 34 #define NV_LOG_LEVEL_INFO 5 35 #define NV_LOG_LEVEL_DBG 6 36 #define NV_LOG_LEVEL_TRACE 7 37 38 uint32_t nv_get_debug_level(void); 39 40 void nv_set_debug_level(uint32_t level); 41 42 #ifdef __cplusplus 43 #if __cplusplus 44 } 45 #endif /* __cplusplus */ 46 #endif /* __cplusplus */ 47 48 #endif /* NV_DEBUG_H */ 49