px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
px_log_color.h
1#ifndef __PX_LOG_COLOR_H__
2#define __PX_LOG_COLOR_H__
3/* =============================================================================
4 ____ ___ ____ ___ _ _ ___ __ __ ___ __ __ TM
5 | _ \ |_ _| / ___| / _ \ | \ | | / _ \ | \/ | |_ _| \ \/ /
6 | |_) | | | | | | | | | | \| | | | | | | |\/| | | | \ /
7 | __/ | | | |___ | |_| | | |\ | | |_| | | | | | | | / \
8 |_| |___| \____| \___/ |_| \_| \___/ |_| |_| |___| /_/\_\
9
10 Copyright (c) 2019 Pieter Conradie <https://piconomix.com>
11
12 License: MIT
13 https://github.com/piconomix/px-fwlib/blob/master/LICENSE.md
14
15 Title: px_log_color.h : Color definitions for debug logging module
16 Author(s): Pieter Conradie
17 Creation Date: 2021-04-20
18
19============================================================================= */
20
21/**
22 * @addtogroup PX_LOG
23 *
24 * @{
25 */
26
27/* _____STANDARD INCLUDES____________________________________________________ */
28
29/* _____PROJECT INCLUDES_____________________________________________________ */
30#ifndef PX_LOG_CFG_COLOR
31#error "PX_LOG_CFG_COLOR must be defined before including this file"
32#endif
33
34#if PX_LOG_CFG_COLOR
35// Include VT100 escape code definitions
36#include "px_vt100.h"
37#endif
38
39/* _____DEFINITIONS__________________________________________________________ */
40#if PX_LOG_CFG_COLOR
41
42#define PX_LOG_CR PX_VT100_ATTR_RST ///< Color Reset
43
44#define PX_LOG_FG_BLACK PX_VT100_FG_BLACK ///< Color Foreground BLACK
45#define PX_LOG_FG_RED PX_VT100_FG_RED ///< Color Foreground RED
46#define PX_LOG_FG_GREEN PX_VT100_FG_GREEN ///< Color Foreground GREEN
47#define PX_LOG_FG_YELLOW PX_VT100_FG_YELLOW ///< Color Foreground YELLOW
48#define PX_LOG_FG_BLUE PX_VT100_FG_BLUE ///< Color Foreground BLUE
49#define PX_LOG_FG_MAGENTA PX_VT100_FG_MAGENTA ///< Color Foreground MAGENTA
50#define PX_LOG_FG_CYAN PX_VT100_FG_CYAN ///< Color Foreground CYAN
51#define PX_LOG_FG_WHITE PX_VT100_FG_WHITE ///< Color Foreground WHITE
52
53#define PX_LOG_BG_BLACK PX_VT100_BG_BLACK ///< Color Background BLACK
54#define PX_LOG_BG_RED PX_VT100_BG_RED ///< Color Background RED
55#define PX_LOG_BG_GREEN PX_VT100_BG_GREEN ///< Color Background GREEN
56#define PX_LOG_BG_YELLOW PX_VT100_BG_YELLOW ///< Color Background YELLOW
57#define PX_LOG_BG_BLUE PX_VT100_BG_BLUE ///< Color Background BLUE
58#define PX_LOG_BG_MAGENTA PX_VT100_BG_MAGENTA ///< Color Background MAGENTA
59#define PX_LOG_BG_CYAN PX_VT100_BG_CYAN ///< Color Background CYAN
60#define PX_LOG_BG_WHITE PX_VT100_BG_WHITE ///< Color Background WHITE
61
62#else
63
64#define PX_LOG_CR
65#define PX_LOG_FG_BLACK
66#define PX_LOG_FG_RED
67#define PX_LOG_FG_GREEN
68#define PX_LOG_FG_YELLOW
69#define PX_LOG_FG_BLUE
70#define PX_LOG_FG_MAGENTA
71#define PX_LOG_FG_CYAN
72#define PX_LOG_FG_WHITE
73#define PX_LOG_BG_BLACK
74#define PX_LOG_BG_RED
75#define PX_LOG_BG_GREEN
76#define PX_LOG_BG_YELLOW
77#define PX_LOG_BG_BLUE
78#define PX_LOG_BG_MAGENTA
79#define PX_LOG_BG_CYAN
80#define PX_LOG_BG_WHITE
81
82#endif
83
84/* _____TYPE DEFINITIONS_____________________________________________________ */
85
86/* _____GLOBAL VARIABLES_____________________________________________________ */
87
88/* _____GLOBAL FUNCTION DECLARATIONS_________________________________________ */
89
90/* _____MACROS_______________________________________________________________ */
91
92/// @}
93#endif