]> rtime.felk.cvut.cz Git - sysless.git/blob - arch/h8300/generic/libs/gdbstub/h8s-2633-sci.h
Added gdbstub. Now is is not working.
[sysless.git] / arch / h8300 / generic / libs / gdbstub / h8s-2633-sci.h
1 #ifndef H8S_2633_SCI_H
2 #define H8S_2633_SCI_H
3
4 #ifndef BIT
5 #define BIT(n)    (1 << n)
6 #endif
7
8 #define SCI_BAUD(n)   (unsigned char)((TARGET_CLOCK_HZ / (32.0 * (n))) - .5)
9 #define SCI_B9600     SCI_BAUD(9600)
10 #define SCI_B115200   SCI_BAUD(115200)
11
12 #define SMR_8BIT  (0)
13 #define SMR_7BIT  BIT(6)
14 #define SMR_NONE  (0)
15 #define SMR_EVEN  BIT(5)
16 #define SMR_ODD   BIT(5) + BIT(4)
17 #define SMR_1STOP (0)
18 #define SMR_2STOP BIT(3)
19
20 /* Definitions for typical SCI settings */
21 #define SCI_8N1   (unsigned char)(SMR_8BIT + SMR_NONE + SMR_1STOP)
22 #define SCI_7N1   (unsigned char)(SMR_7BIT + SMR_NONE + SMR_1STOP)
23 #define SCI_8N2   (unsigned char)(SMR_8BIT + SMR_NONE + SMR_2STOP)
24 #define SCI_7N2   (unsigned char)(SMR_7BIT + SMR_NONE + SMR_2STOP)
25 #define SCI_8E1   (unsigned char)(SMR_8BIT + SMR_EVEN + SMR_1STOP)
26 #define SCI_7E1   (unsigned char)(SMR_7BIT + SMR_EVEN + SMR_1STOP)
27 #define SCI_8E2   (unsigned char)(SMR_8BIT + SMR_EVEN + SMR_2STOP)
28 #define SCI_7E2   (unsigned char)(SMR_7BIT + SMR_EVEN + SMR_2STOP)
29 #define SCI_8O1   (unsigned char)(SMR_8BIT + SMR_ODD  + SMR_1STOP)
30 #define SCI_7O1   (unsigned char)(SMR_7BIT + SMR_ODD  + SMR_1STOP)
31 #define SCI_8O2   (unsigned char)(SMR_8BIT + SMR_ODD  + SMR_2STOP)
32 #define SCI_7O2   (unsigned char)(SMR_7BIT + SMR_ODD  + SMR_2STOP)
33
34 void gdb_sci_init(unsigned char baud, unsigned char config);
35 void gdb_putc(char ch);
36 char gdb_getc(void);
37
38
39 #endif
40
41
42
43
44