RTEMS  5.1
ffuart.h
1 /*
2  * FFUART for PXA250 CPU by Yang Xi<hiyangxi@gmail.com>
3  *
4  * The license and distribution terms for this file may be
5  * found in the file LICENSE in this distribution or at
6  * http://www.rtems.org/license/LICENSE.
7  */
8 
9 #ifndef __FFUART_H__
10 #define __FFUART_H__
11 
12 typedef struct {
13  /*
14  *Receive buffer(DLAB=0).Transmit buffer(DLAB=0).
15  *Divisor Latch Low(DLAB=1)
16  */
17  volatile unsigned int rbr;
18  /*Interrupt enable(DLAB=0). Divisor Latch High(DLAB=1)*/
19  volatile unsigned int ier;
20  /*Interrupt identification.FIFO control*/
21  volatile unsigned int iir;
22  /*Line Control*/
23  volatile unsigned int lcr;
24  /*Modem control*/
25  volatile unsigned int mcr;
26  /*Line Status*/
27  volatile unsigned int lsr;
28  /*Modem status*/
29  volatile unsigned int msr;
30  /*Scratch Pad*/
31  volatile unsigned int spr;
32  /*Infrared Selection*/
33  volatile unsigned int isr;
34 } ffuart_reg_t;
35 
36 
37 #define EIGHT_BITS_NOPARITY_1STOPBIT 0x3
38 #define DLAB 0x80
39 
40 
41 /*Divisor = frequency_uart/(16 * BaudRate*)*/
42 #define FREQUENCY_UART (14745600)
43 
44 #define SEND_EMPTY 0x20
45 #define FULL_RECEIVE 0x01
46 
47 #endif
48 
Definition: ffuart.h:12