1 /*
2  * Copyright : (C) 2023 Phytium Information Technology, Inc.
3  * All Rights Reserved.
4  *
5  * This program is OPEN SOURCE software: you can redistribute it and/or modify it
6  * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
7  * either version 1.0 of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the Phytium Public License for more details.
12  *
13  *
14  * FilePath: fboard_port.h
15  * Created Date: 2023-10-27 17:02:35
16  * Last Modified: 2023-10-27 09:22:20
17  * Description:  This file is for board layer code decoupling
18  *
19  * Modify History:
20  *  Ver      Who        Date               Changes
21  * -----  ----------  --------  ---------------------------------
22  *  1.0     zhangyan  2023/10/27    first release
23  */
24 #ifndef FBOARD_PORT_H
25 #define FBOARD_PORT_H
26 
27 #include <rtthread.h>
28 #include <rtdbg.h>
29 #include "rtconfig.h"
30 
31 
32 #if (DBG_LEVEL >= DBG_WARNING)
33     #define FT_DEBUG_PRINT_W(TAG, format, ...) LOG_W(format, ##__VA_ARGS__)
34 #else
35     #define FT_DEBUG_PRINT_W(TAG, format, ...) LOG_W(...)
36 #endif
37 
38 #if (DBG_LEVEL >= DBG_INFO)
39     #define FT_DEBUG_PRINT_I(TAG, format, ...) LOG_I(format, ##__VA_ARGS__)
40 #else
41     #define FT_DEBUG_PRINT_I(TAG, format, ...) LOG_I(...)
42 #endif
43 
44 #if (DBG_LEVEL >= DBG_ERROR)
45     #define FT_DEBUG_PRINT_E(TAG, format, ...) LOG_E(format, ##__VA_ARGS__)
46 #else
47     #define FT_DEBUG_PRINT_E(TAG, format, ...) LOG_E(...)
48 #endif
49 
50 #if (DBG_LEVEL >= DBG_LOG)
51     #define FT_DEBUG_PRINT_D(TAG, format, ...) LOG_D(format, ##__VA_ARGS__)
52 #else
53     #define FT_DEBUG_PRINT_D(TAG, format, ...) LOG_D(...)
54 #endif
55 
56 #endif