TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
serial_masks.h
Aller à la documentation de ce fichier.
1 
30 #ifndef _SERIAL_MASKS_H_
31 #define _SERIAL_MASKS_H_
32 
33 /* Interrupt Enable Register */
34 #define ERBFI 0x01 /* Enable Receive Data Available Interrupt */
35 #define ETBEI 0x02 /* Enable Transmit Holding Register Empty Interrupt */
36 #define ELSI 0x04 /* Enable Receiver Line Status Interrupt */
37 #define EDSSI 0x08 /* Enable MODEM Status Interrupt */
38 
39 /* Interrupt identification register */
40 #define INTERRUPT_PENDING 0x01
41 #define INTERRUPT_ID(reg) (reg&0x0F)
42 /* #define FIFO_ENABLED(reg) (reg&0xC0)>>6 */
43 
44 #define INT_NONE 0x1
45 #define INT_RX_LINE_STATUS 0x6
46 #define INT_DATA_AVAILABLE 0x4
47 #define INT_CHAR_TIMEOUT 0xC
48 #define INT_THR_EMPTY 0x2
49 #define INT_MODEM_STATUS 0x0
50 
51 /* FIFO Control Register */
52 #define FIFO_ENABLE 0x01
53 #define RCVR_FIFO_RESET 0x02
54 #define XMIT_FIFO_RESET 0x04
55 #define DMA_MODE_SELECT 0x08
56 
57 #define RCVR_TRIGGER 0xC0
58 #define RCVR_TRIGGER_1 0x00
59 #define RCVR_TRIGGER_4 0x40
60 #define RCVR_TRIGGER_8 0x80
61 #define RCVR_TRIGGER_14 0xC0
62 
63 /* Line Control Register */
64 #define WORD_LENGTH 0x03
65 #define STOP_BIT 0x04
66 
67 #define PARITY_BIT 0x38
68 #define NO_PARITY 0x00
69 #define EVEN_PARITY 0x08
70 #define ODD_PARITY 0x18
71 #define MARK_PARITY 0x28
72 #define SPACE_PARITY 0x38
73 
74 #define SET_BREAK 0x40
75 #define DLAB 0x80
76 
77 /* MODEM Control Register */
78 #define DTR 0x01
79 #define RTS 0x02
80 #define OUT1 0x04
81 #define OUT2 0x08
82 #define LOOP 0x10
83 
84 /* Line Status Register */
85 #define DATA_READY 0x01
86 #define OVERRUN_ERROR 0x02
87 #define PARITY_ERROR 0x04
88 #define FRAMING_ERROR 0x08
89 #define BREAK_INTERRUPT 0x10
90 #define THR_EMPTY 0x20
91 #define TX_EMPTY 0x40
92 #define RCVR_FIFO_ERROR 0x80
93 
94 /* MODEM Status Register */
95 #define DCTS 0x01
96 #define DDSR 0x02
97 #define TERI 0x04
98 #define DDCD 0x08
99 #define CTS 0x10
100 #define DSR 0x20
101 #define RI 0x40
102 #define DCD 0x80
103 
104 #endif /* _SERIAL_MASKS_H_ */