Choco OS  V.0.16.9.0
Join to the chocolate world
oc_debug.h
Go to the documentation of this file.
1 
26 #ifndef SYSTEM_CORE_OC_DEBUG_H_
27 #define SYSTEM_CORE_OC_DEBUG_H_
28 
29 #include <oc_stdtypes.h>
30 #include <oc_debug_cfg.h>
31 
32 typedef enum
33 {
34  oC_LogType_Error = (1<<0),
35  oC_LogType_Warning = (1<<1),
36  oC_LogType_Track = (1<<2),
37  oC_LogType_Info = (1<<3),
38  oC_LogType_GoodNews = (1<<4),
39  oC_LogType_All = 0xFFFF,
40  oC_LogType_Default = oC_LogType_All,
41 } oC_LogType_t;
42 
43 #if !defined(CFG_ENABLE_DEBUG_PRINT)
44 # error CFG_ENABLE_DEBUG_PRINT is not defined in oc_debug_cfg.h !
45 #elif CFG_ENABLE_DEBUG_PRINT == ON
46 
47 #ifdef oC_CORE_SPACE
48 # define kdebuglog(LogType , ... ) _kdebuglog( LogType, __FUNCTION__, __VA_ARGS__ )
49 #endif
50 
51 #else
52 
53 #ifdef oC_CORE_SPACE
54 # define kdebuglog(LogType , ... )
55 #endif
56 
57 #endif
58 
59 extern void enkdebuglog( oC_LogType_t LogType );
60 extern void lockkdebuglog( void );
61 extern void unlockkdebuglog( void );
62 extern void _kdebuglog( oC_LogType_t LogType , const char * Function, char * Format , ...);
63 extern bool readlastkdebuglog( char * outString , oC_UInt_t Size );
64 extern bool readoldestkdebuglog( char * outString, oC_UInt_t Size );
65 extern void savekdebuglog( char * Log );
66 
67 #endif /* SYSTEM_CORE_OC_DEBUG_H_ */
void enkdebuglog(oC_LogType_t LogType)
Definition: oc_debug.c:62
Configuration of the debug functions.
bool readoldestkdebuglog(char *outString, oC_UInt_t Size)
Definition: oc_debug.c:183
void savekdebuglog(char *Log)
Definition: oc_debug.c:211
void unlockkdebuglog(void)
Definition: oc_debug.c:82
void lockkdebuglog(void)
Definition: oc_debug.c:72
bool readlastkdebuglog(char *outString, oC_UInt_t Size)
Definition: oc_debug.c:152
FILE__DESCRIPTION