LM3642 Initial Commit : Synchronous Boost Single LED Flash Driver
[windows-iot-driver/drivers.git] / LM3642 / TxnwLedLM3642 / Trace.h
1 /*++\r
2 \r
3 Module Name:\r
4 \r
5 Trace.h\r
6 \r
7 Abstract:\r
8 \r
9 Header file for the debug tracing related function defintions and macros.\r
10 \r
11 Environment:\r
12 \r
13 Kernel mode\r
14 \r
15 --*/\r
16 \r
17 //\r
18 // Define the tracing flags.\r
19 //\r
20 // Tracing GUID - 4b3dc37e-9b04-42ec-b3d5-6093b06f797e\r
21 //\r
22 \r
23 #define WPP_CONTROL_GUIDS                                              \\r
24     WPP_DEFINE_CONTROL_GUID(                                           \\r
25         TxnwLedLm3643TraceGuid, (4b3dc37e,9b04,42ec,b3d5,6093b06f797e), \\r
26                                                                             \\r
27         WPP_DEFINE_BIT(MYDRIVER_ALL_INFO)                              \\r
28         WPP_DEFINE_BIT(TRACE_DRIVER)                                   \\r
29         WPP_DEFINE_BIT(TRACE_DEVICE)                                   \\r
30         WPP_DEFINE_BIT(TRACE_SPB)                                    \\r
31         )                             \r
32 \r
33 #define WPP_FLAG_LEVEL_LOGGER(flag, level)                                  \\r
34     WPP_LEVEL_LOGGER(flag)\r
35 \r
36 #define WPP_FLAG_LEVEL_ENABLED(flag, level)                                 \\r
37     (WPP_LEVEL_ENABLED(flag) &&                                             \\r
38      WPP_CONTROL(WPP_BIT_ ## flag).Level >= level)\r
39 \r
40 #define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \\r
41            WPP_LEVEL_LOGGER(flags)\r
42 \r
43 #define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \\r
44            (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)\r
45 \r
46 //\r
47 // This comment block is scanned by the trace preprocessor to define our\r
48 // Trace function.\r
49 //\r
50 // begin_wpp config\r
51 // FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...);\r
52 // FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);\r
53 // end_wpp\r
54 //\r