1 | #ifndef DEFINE_H
|
2 | #define DEFINE_H 1
|
3 |
|
4 |
|
5 | /***************************************************************************/
|
6 | /* INCLUDES*/
|
7 | /***************************************************************************/
|
8 |
|
9 |
|
10 |
|
11 | /****************************************************************************/
|
12 | /* definition for EEPROM memory for ATMega(16-128) and newer*/
|
13 | /****************************************************************************/
|
14 | #define UARTBUFFERLENGTH 30
|
15 | #define RXLINERECEIVED 0
|
16 |
|
17 | #define UP(Anz) sprintf_P(out,PSTR("\033[%dA"),Anz)
|
18 | #define UP_LINE sprintf_P(out,PSTR("\033[A"))
|
19 |
|
20 | #define RIGHT(Anz) sprintf_P(out,PSTR("\033[%dC"),Anz);uart1_puts(out)
|
21 | #define ONE_POS_RIGHT sprintf_P(out,PSTR("\033[C"));uart1_puts(out)
|
22 |
|
23 | #define POSITION(Ze, Sp) sprintf_P(out,PSTR("\033[%d;%dH"),Ze,Sp);uart1_puts(out)
|
24 |
|
25 | #define CLEAR sprintf_P(out,PSTR("\033[2J"));uart1_puts(out)
|
26 |
|
27 |
|
28 | #define FORECOLOR_BLACK sprintf_P(out,PSTR("\033[30m"));uart1_puts(out)
|
29 | #define FORECOLOR_RED sprintf_P(out,PSTR("\033[31m"));uart1_puts(out)
|
30 | #define FORECOLOR_GREEN sprintf_P(out,PSTR("\033[32m"));uart1_puts(out)
|
31 | #define FORECOLOR_YELLOW sprintf_P(out,PSTR("\033[33m"));uart1_puts(out)
|
32 | #define FORECOLOR_BLUE sprintf_P(out,PSTR("\033[34m"));uart1_puts(out)
|
33 | #define FORECOLOR_VIOLETT sprintf_P(out,PSTR("\033[35m"));uart1_puts(out)
|
34 | #define FORECOLOR_KOBALTBLUE sprintf_P(out,PSTR("\033[36m"));uart1_puts(out)
|
35 | #define FORECOLOR_WHITE sprintf_P(out,PSTR("\033[37m"));uart1_puts(out)
|
36 | #define BACKCOLOR_BLACK sprintf_P(out,PSTR("\033[40m"));uart1_puts(out)
|
37 | #define BACKCOLOR_RED sprintf_P(out,PSTR("\033[41m"));uart1_puts(out)
|
38 | #define BACKCOLOR_GREEN sprintf_P(out,PSTR("\033[42m"));uart1_puts(out)
|
39 | #define BACKCOLOR_YELLOW sprintf_P(out,PSTR("\033[43m"));uart1_puts(out)
|
40 | #define BACKCOLOR_BLUE sprintf_P(out,PSTR("\033[44m"));uart1_puts(out)
|
41 | #define BACKCOLOR_VIOLETT sprintf_P(out,PSTR("\033[45m"));uart1_puts(out)
|
42 | #define BACKCOLOR_KOBALTBLUE sprintf_P(out,PSTR("\033[46m"));uart1_puts(out)
|
43 | #define BACKCOLOR_WHITE sprintf_P(out,PSTR("\033[47m"));uart1_puts(out)
|
44 |
|
45 |
|
46 |
|
47 | typedef struct
|
48 | {
|
49 | unsigned char rxptr;
|
50 | unsigned char comflags;
|
51 | char rxbuffer[UARTBUFFERLENGTH];
|
52 | }usart;
|
53 |
|
54 | #endif
|