• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: little file system config header.
15  */
16 
17 #ifndef LITTLSFS_CONFIG_H
18 #define LITTLSFS_CONFIG_H
19 
20 #if defined(CONFIG_LFS_ADAPT_DEBUG) || defined(CONFIG_LFS_ADAPT_WARN) || defined(CONFIG_LFS_ADAPT_ERROR)
21 #include "debug_print.h"
22 #endif
23 
24 #ifdef CONFIG_LFS_ADAPT_DEBUG
25 #define lfs_debug_print_info(fmt, arg...) print_str("LFS [I]:" fmt, ##arg)
26 #else
27 #define lfs_debug_print_info(fmt, arg...)
28 #endif
29 
30 #ifdef CONFIG_LFS_ADAPT_WARN
31 #define lfs_debug_print_warning(fmt, arg...) print_str("LFS [W]:" fmt, ##arg)
32 #else
33 #define lfs_debug_print_warning(fmt, arg...)
34 #endif
35 
36 #ifdef CONFIG_LFS_ADAPT_ERROR
37 #define lfs_debug_print_error(fmt, arg...) print_str("LFS [E]:" fmt, ##arg)
38 #else
39 #define lfs_debug_print_error(fmt, arg...)
40 #endif
41 
42 #endif