mb/google/brox/var/jubilant: Disable Tccold Handshake
[coreboot.git] / payloads / libpayload / curses / pdcurses-backend / pdcutil.c
blobf3f131f073d55d8aaee751c03f19bb6d427d809d
1 /* Public Domain Curses */
2 /* This file is BSD licensed, Copyright 2011 secunet AG */
4 #include "lppdc.h"
5 #include <curses.h>
6 #include <libpayload.h>
8 int curses_flags = F_ENABLE_SERIAL | F_ENABLE_CONSOLE;
10 void PDC_beep(void)
12 PDC_LOG(("PDC_beep() - called\n"));
14 #if CONFIG(LP_SPEAKER)
15 speaker_tone(1760, 500); /* 1760 == note A6 */
16 #endif
19 void PDC_napms(int ms)
21 PDC_LOG(("PDC_napms() - called: ms=%d\n", ms));
23 mdelay(ms);
26 const char *PDC_sysname(void)
28 return "LIBPAYLOAD";
31 void curses_enable_serial(int enable)
33 curses_flags = (curses_flags & ~F_ENABLE_SERIAL) | (enable * F_ENABLE_SERIAL);
36 void curses_enable_vga(int enable)
38 curses_flags = (curses_flags & ~F_ENABLE_CONSOLE) | (enable * F_ENABLE_CONSOLE);
41 int curses_serial_enabled(void)
43 return !!(curses_flags & F_ENABLE_SERIAL);
46 int curses_vga_enabled(void)
48 return !!(curses_flags & F_ENABLE_CONSOLE);