POK(kernelpart)
/home/jaouen/pok_official/pok/trunk/kernel/arch/x86/x86-qemu/cons.h
Go to the documentation of this file.
00001 /*
00002  *                               POK header
00003  * 
00004  * The following file is a part of the POK project. Any modification should
00005  * made according to the POK licence. You CANNOT use this file or a part of
00006  * this file is this part of a file for your own project
00007  *
00008  * For more information on the POK licence, please see our LICENCE FILE
00009  *
00010  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
00011  *
00012  *                                      Copyright (c) 2007-2009 POK team 
00013  *
00014  * Created by julien on Thu Jan 15 23:34:13 2009 
00015  */
00016 
00017 
00018 #ifndef __POK_CONS_H__
00019 #define __POK_CONS_H__
00020 
00021 #if defined (POK_NEEDS_DEBUG) || defined (POK_NEEDS_CONSOLE) || defined (POK_NEEDS_INSTRUMENTATION) || defined (POK_NEEDS_COVERAGE_INFOS)
00022 #include <arch.h>
00023 #include <errno.h>
00024 #include <types.h>
00025 
00026 #define CONS_ESCAPE    255
00027 #define CONS_CLEAR     1
00028 #define CONS_COLOR     2
00029 #define CONS_SETX      3
00030 #define CONS_SETY      4
00031 
00032 #define CONS_BLACK     0x0
00033 #define CONS_BLUE      0x1
00034 #define CONS_GREEN     0x2
00035 #define CONS_CYAN      0x3
00036 #define CONS_RED       0x4
00037 #define CONS_MAGENTA   0x5
00038 #define CONS_YELLOW    0x6
00039 #define CONS_WHITE     0x7
00040 
00041 #define CONS_BLINK     (1 << 7)
00042 #define CONS_LIGHT     (1 << 3)
00043 
00044 #define CONS_FRONT(Color)      (Color)
00045 #define CONS_BACK(Color)       (Color << 4)
00046 
00047 
00048 struct s_cons
00049 {
00050   char row;
00051   char col;
00052   char cur_attr;
00053 };
00054 
00055 void        pok_cons_print_char(const char c);
00056 void        pok_cons_attr(uint8_t attr);
00057 void        pok_cons_disable_cursor(void);
00058 pok_bool_t  pok_cons_write(const char *s, size_t length);
00059 void        pok_cons_clear(void);
00060 #endif
00061 
00062 int         pok_cons_init(void);
00063 
00064 #endif