source: rtems/c/src/lib/libbsp/sparc/shared/include/apbuart.h @ e16e0ca

4.104.114.84.95
Last change on this file since e16e0ca was e16e0ca, checked in by Joel Sherrill <joel.sherrill@…>, on 09/06/07 at 13:25:42

2007-09-06 Daniel Hellstrom <daniel@…>

  • Makefile.am: Add the following new drivers: PCI, b1553BRM, SpaceWire?(GRSPW), CAN (GRCAN,OC_CAN), Raw UART.
  • shared/include/apbuart.h, shared/include/apbuart_pci.h, shared/include/apbuart_rasta.h, shared/include/b1553brm.h, shared/include/b1553brm_pci.h, shared/include/b1553brm_rasta.h, shared/include/debug_defs.h, shared/include/grcan.h, shared/include/grcan_rasta.h, shared/include/grcan_spwrtc.h, shared/include/grspw.h, shared/include/grspw_pci.h, shared/include/grspw_rasta.h, shared/include/occan.h, shared/include/occan_pci.h, shared/include/pci.h: New files.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 *  Driver interface for APBUART
3 *
4 *  COPYRIGHT (c) 2007.
5 *  Gaisler Research
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 */
12
13#ifndef __APBUART_H__
14#define __APBUART_H__
15
16#include <ambapp.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22typedef struct {
23  unsigned int hw_dovr;
24  unsigned int hw_parity;
25  unsigned int hw_frame;
26  unsigned int sw_dovr;
27  unsigned int rx_cnt;
28  unsigned int tx_cnt;
29} apbuart_stats;
30
31#define APBUART_START    0
32#define APBUART_STOP     1
33#define APBUART_SET_RXFIFO_LEN 2
34#define APBUART_SET_TXFIFO_LEN 3
35#define APBUART_SET_BAUDRATE   4
36#define APBUART_SET_SCALER     5
37#define APBUART_SET_BLOCKING   6
38#define APBUART_SET_ASCII_MODE 7
39
40
41#define APBUART_GET_STATS 16
42#define APBUART_CLR_STATS 17
43
44#define APBUART_BLK_RX 0x1
45#define APBUART_BLK_TX 0x2
46#define APBUART_BLK_FLUSH 0x4
47
48
49#define APBUART_CTRL_RE 0x1
50#define APBUART_CTRL_TE 0x2
51#define APBUART_CTRL_RI 0x4
52#define APBUART_CTRL_TI 0x8
53#define APBUART_CTRL_PS 0x10
54#define APBUART_CTRL_PE 0x20
55#define APBUART_CTRL_FL 0x40
56#define APBUART_CTRL_LB 0x80
57#define APBUART_CTRL_EC 0x100
58#define APBUART_CTRL_TF 0x200
59#define APBUART_CTRL_RF 0x400
60
61#define APBUART_STATUS_DR 0x1
62#define APBUART_STATUS_TS 0x2
63#define APBUART_STATUS_TE 0x4
64#define APBUART_STATUS_BR 0x8
65#define APBUART_STATUS_OV 0x10
66#define APBUART_STATUS_PE 0x20
67#define APBUART_STATUS_FE 0x40
68#define APBUART_STATUS_TH 0x80
69#define APBUART_STATUS_RH 0x100
70#define APBUART_STATUS_TF 0x200
71#define APBUART_STATUS_RF 0x400
72
73/* Register APBUART driver
74 * bus =  pointer to AMBA bus description used to search for APBUART(s).
75 *        (&amba_conf for LEON3), (LEON2: see amba_scan)
76 */
77int apbuart_register (amba_confarea_type * bus);
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* __APBUART_H__ */
Note: See TracBrowser for help on using the repository browser.