1#ifndef __console_console_h
2#define __console_console_h
13#define CONSOLE_COLOR_RED 0x0000FF00
14#define CONSOLE_COLOR_BLUE 0xD8444E00
15#define CONSOLE_COLOR_GREEN 0x00800000
16#define CONSOLE_COLOR_BLACK 0x00000000
17#define CONSOLE_COLOR_WHITE 0xFFFFFF00
18#define CONSOLE_COLOR_GREY 0xC0C0C000
19#define CONSOLE_COLOR_BROWN 0x00339900
20#define CONSOLE_COLOR_PURPLE 0xFF009900
21#define CONSOLE_COLOR_YELLOW 0x00FFFF00
22#define CONSOLE_COLOR_ORANGE 0x0066FF00
23#define CONSOLE_COLOR_PINK 0xFF66FF00
25#define CONSOLE_SUCCESS CONSOLE_COLOR_GREEN
26#define CONSOLE_WARN CONSOLE_COLOR_YELLOW
27#define CONSOLE_ERR CONSOLE_COLOR_ORANGE
29#define PRINT_COL(bg, fg, s, ...) { \
30 console_oldbg = console_color[0]; console_oldfg = console_color[1]; \
31 console_set_colors(bg,fg); \
32 printf(s, ##__VA_ARGS__); \
33 console_set_colors(console_oldbg,console_oldfg); }
35#define PRINT_SUCCESS(s, ...) PRINT_COL(console_color[0],CONSOLE_SUCCESS, s, ##__VA_ARGS__)
36#define PRINT_WARN(s, ...) PRINT_COL(console_color[0],CONSOLE_WARN, s, ##__VA_ARGS__)
37#define PRINT_ERR(s, ...) PRINT_COL(console_color[0],CONSOLE_ERR, s, ##__VA_ARGS__)
47void console_pset(
int x,
int y,
unsigned char r,
unsigned char g,
unsigned char b);
48void console_pset_right(
int x,
int y,
unsigned char r,
unsigned char g,
unsigned char b);
void console_pset_right(int x, int y, unsigned char r, unsigned char g, unsigned char b)
void console_set_colors(unsigned int background, unsigned int foreground)
void console_get_dimensions(unsigned int *width, unsigned int *height)
uint32_t console_color[2]
void console_putch(const char c)
void console_pset(int x, int y, unsigned char r, unsigned char g, unsigned char b)