RTEMS
apbuart.h
Go to the documentation of this file.
1 
6 /*
7  * COPYRIGHT (c) 2007.
8  * Gaisler Research
9  *
10  * The license and distribution terms for this file may be
11  * found in the file LICENSE in this distribution or at
12  * http://www.rtems.org/license/LICENSE.
13  *
14  */
15 
16 #ifndef __APBUART_H__
17 #define __APBUART_H__
18 
29 #include "ambapp.h"
30 #include "grlib.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #define APBUART_CTRL_RE 0x1
37 #define APBUART_CTRL_TE 0x2
38 #define APBUART_CTRL_RI 0x4
39 #define APBUART_CTRL_TI 0x8
40 #define APBUART_CTRL_PS 0x10
41 #define APBUART_CTRL_PE 0x20
42 #define APBUART_CTRL_FL 0x40
43 #define APBUART_CTRL_LB 0x80
44 #define APBUART_CTRL_EC 0x100
45 #define APBUART_CTRL_TF 0x200
46 #define APBUART_CTRL_RF 0x400
47 #define APBUART_CTRL_DB 0x800
48 #define APBUART_CTRL_BI 0x1000
49 #define APBUART_CTRL_DI 0x2000
50 #define APBUART_CTRL_FA 0x80000000
51 
52 #define APBUART_STATUS_DR 0x1
53 #define APBUART_STATUS_TS 0x2
54 #define APBUART_STATUS_TE 0x4
55 #define APBUART_STATUS_BR 0x8
56 #define APBUART_STATUS_OV 0x10
57 #define APBUART_STATUS_PE 0x20
58 #define APBUART_STATUS_FE 0x40
59 #define APBUART_STATUS_ERR 0x78
60 #define APBUART_STATUS_TH 0x80
61 #define APBUART_STATUS_RH 0x100
62 #define APBUART_STATUS_TF 0x200
63 #define APBUART_STATUS_RF 0x400
64 
65 void apbuart_outbyte_polled(
66  struct apbuart_regs *regs,
67  unsigned char ch,
68  int do_cr_on_newline,
69  int wait_sent
70 );
71 
72 int apbuart_inbyte_nonblocking(struct apbuart_regs *regs);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
80 #endif /* __APBUART_H__ */
Common GRLIB AMBA Core Register definitions.