1 | /* |
---|
2 | * Driver for the sh1 703x on-chip serial devices (sci) |
---|
3 | * |
---|
4 | * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and |
---|
5 | * Bernd Becker (becker@faw.uni-ulm.de) |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany |
---|
8 | * |
---|
9 | * This program is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
12 | * |
---|
13 | * |
---|
14 | * COPYRIGHT (c) 1998. |
---|
15 | * On-Line Applications Research Corporation (OAR). |
---|
16 | * Copyright assigned to U.S. Government, 1994. |
---|
17 | * |
---|
18 | * The license and distribution terms for this file may be |
---|
19 | * found in the file LICENSE in this distribution or at |
---|
20 | * http://www.OARcorp.com/rtems/license.html. |
---|
21 | * |
---|
22 | * $Id$ |
---|
23 | */ |
---|
24 | |
---|
25 | #ifndef _sh_sci_h |
---|
26 | #define _sh_sci_h |
---|
27 | |
---|
28 | #ifdef __cplusplus |
---|
29 | extern "C" { |
---|
30 | #endif |
---|
31 | |
---|
32 | /* |
---|
33 | * Devices are set to 9600 bps, 8 databits, 1 stopbit, no |
---|
34 | * parity and asynchronous mode by default. |
---|
35 | * |
---|
36 | * NOTE: |
---|
37 | * The onboard serial devices of the SH do not support hardware |
---|
38 | * handshake. |
---|
39 | */ |
---|
40 | |
---|
41 | #define DEVSCI_DRIVER_TABLE_ENTRY \ |
---|
42 | { sh_sci_initialize, sh_sci_open, sh_sci_close, sh_sci_read, \ |
---|
43 | sh_sci_write, sh_sci_control } |
---|
44 | |
---|
45 | extern rtems_device_driver sh_sci_initialize( |
---|
46 | rtems_device_major_number, |
---|
47 | rtems_device_minor_number, |
---|
48 | void * |
---|
49 | ); |
---|
50 | |
---|
51 | extern rtems_device_driver sh_sci_open( |
---|
52 | rtems_device_major_number, |
---|
53 | rtems_device_minor_number, |
---|
54 | void * |
---|
55 | ); |
---|
56 | |
---|
57 | extern rtems_device_driver sh_sci_close( |
---|
58 | rtems_device_major_number, |
---|
59 | rtems_device_minor_number, |
---|
60 | void * |
---|
61 | ); |
---|
62 | |
---|
63 | extern rtems_device_driver sh_sci_read( |
---|
64 | rtems_device_major_number, |
---|
65 | rtems_device_minor_number, |
---|
66 | void * |
---|
67 | ); |
---|
68 | |
---|
69 | extern rtems_device_driver sh_sci_write( |
---|
70 | rtems_device_major_number, |
---|
71 | rtems_device_minor_number, |
---|
72 | void * |
---|
73 | ); |
---|
74 | |
---|
75 | extern rtems_device_driver sh_sci_control( |
---|
76 | rtems_device_major_number, |
---|
77 | rtems_device_minor_number, |
---|
78 | void * |
---|
79 | ); |
---|
80 | |
---|
81 | /* Internal error codes */ |
---|
82 | #define SH_TTY_NO_ERROR 0x2000 |
---|
83 | #define SH_TTY_FRAME_ERR 0x2001 |
---|
84 | #define SH_TTY_PARITY_ERR 0x2002 |
---|
85 | #define SH_TTY_OVERRUN_ERR 0x2003 |
---|
86 | |
---|
87 | #ifdef __cplusplus |
---|
88 | } |
---|
89 | #endif |
---|
90 | |
---|
91 | #endif |
---|