Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 1 | /* Public Domain Curses */ |
| 2 | /* This file is BSD licensed, Copyright 2011 secunet AG */ |
| 3 | |
Stefan Reinauer | 0a527e7 | 2013-03-25 15:38:21 -0700 | [diff] [blame] | 4 | #include <libpayload.h> |
Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 5 | #include "lppdc.h" |
| 6 | |
| 7 | int PDC_curs_set(int visibility) |
| 8 | { |
| 9 | int ret_vis; |
| 10 | |
| 11 | PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility)); |
| 12 | |
| 13 | ret_vis = SP->visibility; |
| 14 | SP->visibility = visibility; |
| 15 | |
Stefan Reinauer | 1b4d394 | 2015-06-29 15:47:34 -0700 | [diff] [blame^] | 16 | #if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE) |
Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 17 | if (curses_flags & F_ENABLE_SERIAL) { |
| 18 | serial_cursor_enable(visibility); |
| 19 | } |
| 20 | #endif |
Stefan Reinauer | 1b4d394 | 2015-06-29 15:47:34 -0700 | [diff] [blame^] | 21 | #if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE) |
Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 22 | if (curses_flags & F_ENABLE_CONSOLE) { |
| 23 | video_console_cursor_enable(visibility); |
| 24 | } |
| 25 | #endif |
| 26 | |
| 27 | return ret_vis; |
| 28 | } |
| 29 | |
| 30 | int PDC_set_blink(bool blinkon) |
| 31 | { |
Patrick Georgi | ba9b09b | 2011-11-11 11:05:42 +0100 | [diff] [blame] | 32 | if (pdc_color_started) |
| 33 | COLORS = 16; |
| 34 | |
Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 35 | return ERR; |
| 36 | } |