diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cons/cons.c | 17 | ||||
-rw-r--r-- | sys/include/dev/cons/cons.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/cons/cons.c b/sys/dev/cons/cons.c index 61254a7..0e22bb5 100644 --- a/sys/dev/cons/cons.c +++ b/sys/dev/cons/cons.c @@ -379,6 +379,23 @@ cons_init_bufs(struct cons_screen *scr) } /* + * Reset console color. + */ +void +cons_reset_color(struct cons_screen *scr) +{ + g_root_scr.fg = CONSOLE_FG; + g_root_scr.bg = CONSOLE_BG; +} + +void +cons_update_color(struct cons_screen *scr, uint32_t fg, uint32_t bg) +{ + scr->fg = fg; + scr->bg = bg; +} + +/* * Put a character on the screen. * * @scr: Screen. diff --git a/sys/include/dev/cons/cons.h b/sys/include/dev/cons/cons.h index b27be23..fb254cb 100644 --- a/sys/include/dev/cons/cons.h +++ b/sys/include/dev/cons/cons.h @@ -64,6 +64,8 @@ struct cons_screen { void cons_init(void); void cons_expose(void); +void cons_update_color(struct cons_screen *scr, uint32_t fg, uint32_t bg); +void cons_reset_color(struct cons_screen *scr); int cons_putch(struct cons_screen *scr, char c); int cons_putstr(struct cons_screen *scr, const char *s, size_t len); |