1 | /* |
---|
2 | * conio.h : ARM GP32 BSP |
---|
3 | * |
---|
4 | * This file contains the GP32 conio I/O package. |
---|
5 | * |
---|
6 | * |
---|
7 | * Copyright (c) 2004 Markku Puro <markku.puro@kopteri.net> |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef _CONIO_H |
---|
17 | #define _CONIO_H |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | /*---------------------------------------------------------------------------* |
---|
24 | * Defines * |
---|
25 | *---------------------------------------------------------------------------*/ |
---|
26 | #define ASCII_BEL 0x07 /* bell */ |
---|
27 | #define ASCII_BS 0x08 /* backspace */ |
---|
28 | #define ASCII_TAB 0x09 /* horizontal tab */ |
---|
29 | #define ASCII_LF 0x0A /* line feed */ |
---|
30 | #define ASCII_CR 0x0D /* carriage return */ |
---|
31 | #define ASCII_XON 0x11 /* control-Q */ |
---|
32 | #define ASCII_XOFF 0x13 /* control-S */ |
---|
33 | #define ASCII_ESC 0x1B /* escape */ |
---|
34 | |
---|
35 | enum COLORS |
---|
36 | { |
---|
37 | BLACK, |
---|
38 | BLUE, |
---|
39 | GREEN, |
---|
40 | CYAN, |
---|
41 | RED, |
---|
42 | MAGENTA, |
---|
43 | BROWN, |
---|
44 | LIGHTGRAY, |
---|
45 | DARKGRAY, |
---|
46 | LIGHTBLUE, |
---|
47 | LIGHTGREEN, |
---|
48 | LIGHTCYAN, |
---|
49 | LIGHTRED, |
---|
50 | LIGHTMAGENTA, |
---|
51 | YELLOW, |
---|
52 | WHITE, |
---|
53 | MAXCOLORS |
---|
54 | }; |
---|
55 | |
---|
56 | #define DEF_TEXTCOLOR BLACK |
---|
57 | #define DEF_TEXTBACKGROUND WHITE |
---|
58 | |
---|
59 | /*---------------------------------------------------------------------------* |
---|
60 | * Prototypes * |
---|
61 | *---------------------------------------------------------------------------*/ |
---|
62 | void gpconio_clrscr(); |
---|
63 | void gpconio_textattr(int _attr); |
---|
64 | void gpconio_textbackground(int _color); |
---|
65 | void gpconio_textcolor(int _color); |
---|
66 | void gpconio_putch(char _c); |
---|
67 | void gpconio_puts(const char *_str); |
---|
68 | int gpconio_printf(const char *_format, ...); |
---|
69 | void gpconio_gotoxy(int _x, int _y); |
---|
70 | |
---|
71 | char gpconio_getch(void); |
---|
72 | char gpconio_getch_noblock(void); |
---|
73 | |
---|
74 | |
---|
75 | #ifdef __cplusplus |
---|
76 | } |
---|
77 | #endif |
---|
78 | |
---|
79 | #endif // _CONIO_H |
---|