Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:22:49

0001 /*
0002  *  FFUART for PXA250 CPU by Yang Xi<hiyangxi@gmail.com>
0003  *
0004  *  The license and distribution terms for this file may be
0005  *  found in the file LICENSE in this distribution or at
0006  *  http://www.rtems.org/license/LICENSE.
0007  */
0008 
0009 #ifndef __FFUART_H__
0010 #define __FFUART_H__
0011 
0012 typedef struct {
0013   /*
0014    *Receive buffer(DLAB=0).Transmit buffer(DLAB=0).
0015    *Divisor Latch Low(DLAB=1)
0016    */
0017   volatile unsigned int rbr;
0018   /*Interrupt enable(DLAB=0). Divisor Latch High(DLAB=1)*/
0019   volatile unsigned int ier;
0020   /*Interrupt identification.FIFO control*/
0021   volatile unsigned int iir;
0022   /*Line Control*/
0023   volatile unsigned int lcr;
0024   /*Modem control*/
0025   volatile unsigned int mcr;
0026   /*Line Status*/
0027   volatile unsigned int lsr;
0028   /*Modem status*/
0029   volatile unsigned int msr;
0030   /*Scratch Pad*/
0031   volatile unsigned int spr;
0032   /*Infrared Selection*/
0033   volatile unsigned int isr;
0034 } ffuart_reg_t;
0035 
0036 
0037 #define EIGHT_BITS_NOPARITY_1STOPBIT  0x3
0038 #define DLAB 0x80
0039 
0040 
0041 /*Divisor = frequency_uart/(16 * BaudRate*)*/
0042 #define FREQUENCY_UART (14745600)
0043 
0044 #define SEND_EMPTY 0x20
0045 #define FULL_RECEIVE 0x01
0046 
0047 #endif
0048