source: rtems/c/src/libchip/serial/mc68681.h @ dd5d2f04

4.104.114.84.9
Last change on this file since dd5d2f04 was dd5d2f04, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 16, 1998 at 12:03:01 AM

Split default baud rate table into its own file. This shrinks the
size of the minimum mc68681 driver. The clock speed field can not
now be configured as NULL but must instead specify the address of
the default table.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/*
2 *
3 *  COPYRIGHT (c) 1989-1998.
4 *  On-Line Applications Research Corporation (OAR).
5 *  Copyright assigned to U.S. Government, 1994.
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.OARcorp.com/rtems/license.html.
10 *
11 *  $Id$
12 */
13
14#ifndef _MC68681_H_
15#define _MC68681_H_
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/*
22 *  These are just used in the interface between this driver and
23 *  the read/write register routines when accessing the first
24 *  control port.
25 */
26
27#define MC68681_STATUS          1
28#define MC68681_RX_BUFFER       3
29
30#define MC68681_MODE            0
31#define MC68681_CLOCK_SELECT    1
32#define MC68681_COMMAND         2
33#define MC68681_TX_BUFFER       3
34
35/*
36 *  Data Port bit map configuration
37 *
38 *   D0      : Baud Rate Set Selection
39 *   D1 - D2 : Extended Baud Rate Setting
40 */
41
42#define MC68681_DATA_BAUD_RATE_SET_1      0  /* ACR[7] = 0 */
43#define MC68681_DATA_BAUD_RATE_SET_2      1  /* ACR[7] = 1 */
44
45#define MC68681_XBRG_IGNORED              (0 << 1)
46#define MC68681_XBRG_ENABLED              (1 << 1)
47#define MC68681_XBRG_DISABLED             (2 << 1)
48#define MC68681_XBRG_MASK                 (3 << 1)
49
50/*
51 *  Custom baud rate table information
52 */
53
54typedef unsigned char mc68681_baud_t;
55typedef mc68681_baud_t mc68681_baud_table_t[RTEMS_TERMIOS_NUMBER_BAUD_RATES];
56
57#define MC68681_BAUD_NOT_VALID 0xFF
58
59extern mc68681_baud_t
60    mc68681_baud_rate_table[4][RTEMS_TERMIOS_NUMBER_BAUD_RATES];
61
62
63/*
64 * Driver function table
65 */
66
67extern console_fns mc68681_fns;
68extern console_fns mc68681_fns_polled;
69
70/*
71 * Default register access routines
72 */
73
74unsigned8 mc68681_get_register(     /* registers are at 1 byte boundaries */
75  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
76  unsigned8   ucRegNum
77);
78
79void  mc68681_set_register(
80  unsigned32  ulCtrlPort,
81  unsigned8   ucRegNum,
82  unsigned8   ucData
83);
84
85unsigned8 mc68681_get_register_2(   /* registers are at 2 byte boundaries */
86  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
87  unsigned8   ucRegNum
88);
89
90void  mc68681_set_register_2(
91  unsigned32  ulCtrlPort,
92  unsigned8   ucRegNum,
93  unsigned8   ucData
94);
95
96unsigned8 mc68681_get_register_4(   /* registers are at 4 byte boundaries */
97  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
98  unsigned8   ucRegNum
99);
100
101void  mc68681_set_register_4(
102  unsigned32  ulCtrlPort,
103  unsigned8   ucRegNum,
104  unsigned8   ucData
105);
106
107unsigned8 mc68681_get_register_8(   /* registers are at 8 byte boundaries */
108  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
109  unsigned8   ucRegNum
110);
111
112void  mc68681_set_register_8(
113  unsigned32  ulCtrlPort,
114  unsigned8   ucRegNum,
115  unsigned8   ucData
116);
117
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif /* _MC68681_H_ */
Note: See TracBrowser for help on using the repository browser.