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

4.115
Last change on this file since e2b4891 was e2b4891, checked in by Sebastian Huber <sebastian.huber@…>, on 03/01/13 at 15:29:20

libchip: Fix prototypes

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