1 //*----------------------------------------------------------------------------
2 //* ATMEL Microcontroller Software Support - ROUSSET -
3 //*----------------------------------------------------------------------------
4 //* The software is delivered "AS IS" without warranty or condition of any
5 //* kind, either express, implied or statutory. This includes without
6 //* limitation any warranty or condition with respect to merchantability or
7 //* fitness for any particular purpose, or against the infringements of
8 //* intellectual property rights of others.
9 //*----------------------------------------------------------------------------
13 //* 1.0 27/03/03 HIi : Creation
14 //*----------------------------------------------------------------------------
20 #define AT91C_CB_SIZE 40 // size of the console buffer
22 //* Escape sequences */
24 #define CLRSCREEN "ESC[2J" //\033 = ESC in octal
25 #define ClEARLINE "ESC[K" // Clear line, from cursor position to the right most position of line
27 //* Cursor Movement */
28 #define MOVEUP(num) "ESC[numA" // Move the cursor up num positions
29 #define MOVEDOWN(num) "ESC[numB" // Move the cursor down num positions
30 #define MOVERIGHT(num) "ESC[numC" // Move the cursor right num positions
31 #define MOVELEFT(num) "ESC[numD" // Move the cursor left num positions
32 #define MOVETO(row,col) "ESC[row;colH" // Move the cursor to the (col, row) position. Note that the row comes before column; that is, y comes before x. Either col or row can be omitted. Row and column both start with "1," not zero. (1, 1) corresponds to the top-left corner of the screen.
36 #define CHANGE_CHAR_MODE(attr) "ESC[attrm" //Change the character mode with attribute attr. The attributes are numbers listed below.
38 #define ALL_ATTRIB_OFF 0 // All attributes turned off. (Except for foreground and background color).
39 #define HIGH_INTENSITY 1 // Bold.
40 #define LOW_INTENSITY 2 // Normal.
41 #define UNDERLINE 4 // Underline font.
42 #define BLINK 5 // Blinking font.
43 #define RAPID_BLINK 6 // Works only on some systems.
44 #define REVERSE_VIDEO 7 // Swapping the foreground color and the background color.
45 #define FOREGROUND_BLACK 30 // Black.
46 #define FOREGROUND_RED 31 // Red.
47 #define FOREGROUND_GREEN 32 // Green.
48 #define FOREGROUND_YELLOW 33 // Yellow.
49 #define FOREGROUND_BLUE 34 // Blue.
50 #define FOREGROUND_MAGENTA 35 // Magenta.
51 #define FOREGROUND_CYAN 36 // Cyan.
52 #define FOREGROUND_WHITE 37 // White.
53 #define BACKGROUND_BLACK 40 // Black.
54 #define BACKGROUND_RED 41 // Red.
55 #define BACKGROUND_GREEN 42 // Green.
56 #define BACKGROUND_YELLOW 43 // Yellow.
57 #define BACKGROUND_BLUE 44 // Blue.
58 #define BACKGROUND_MAGENTA 45 // Magenta.
59 #define BACKGROUND_CYAN 46 // Cyan.
60 #define BACKGROUND_WHITE 47 // White.
62 extern char message
[AT91C_CB_SIZE
];
63 extern void AT91F_ClrScr(void);
64 extern int AT91F_ReadLine (const char *const prompt
, char *console_buffer
);
65 extern void AT91F_WaitKeyPressed(void);
67 extern int at91_dbgu_putc(int ch
);
68 extern int at91_dbgu_getc();