source: rtems/c/src/lib/include/zilog/z8530.h @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  z8530.h
2 *
3 *  This include file defines information related to a Zilog Z8530
4 *  SCC Chip.  It is a IO mapped part.
5 *
6 *  Input parameters:   NONE
7 *
8 *  Output parameters:  NONE
9 *
10 *  COPYRIGHT (c) 1989-1998.
11 *  On-Line Applications Research Corporation (OAR).
12 *  Copyright assigned to U.S. Government, 1994.
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.OARcorp.com/rtems/license.html.
17 *
18 *  $Id$
19 */
20
21#ifndef __Z8530_h
22#define __Z8530_h
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* macros */
29
30#define VOL8( ptr )   ((volatile rtems_unsigned8 *)(ptr))
31
32#define Z8x30_STATE0 ( z8530 ) \
33  { char *garbage; \
34    (garbage) = *(VOL8(z8530)) \
35  }
36
37#define Z8x30_WRITE_CONTROL( z8530, reg, data ) \
38   *(VOL8(z8530)) = (reg); \
39   *(VOL8(z8530)) = (data)
40
41#define Z8x30_READ_CONTROL( z8530, reg, data ) \
42   *(VOL8(z8530)) = (reg); \
43   (data) = *(VOL8(z8530))
44
45#define Z8x30_WRITE_DATA( z8530, data ) \
46   *(VOL8(z8530)) = (data);
47
48#define Z8x30_READ_DATA( z8530, data ) \
49   (data) = *(VOL8(z8530));
50
51
52/* RR_0 Bit Definitions */
53
54#define RR_0_TX_BUFFER_EMPTY   0x04
55#define RR_0_RX_DATA_AVAILABLE 0x01
56
57/* read registers */
58
59#define RR_0       0x00
60#define RR_1       0x01
61#define RR_2       0x02
62#define RR_3       0x03
63#define RR_4       0x04
64#define RR_5       0x05
65#define RR_6       0x06
66#define RR_7       0x07
67#define RR_8       0x08
68#define RR_9       0x09
69#define RR_10      0x0A
70#define RR_11      0x0B
71#define RR_12      0x0C
72#define RR_13      0x0D
73#define RR_14      0x0E
74#define RR_15      0x0F
75
76/* write registers */
77
78#define WR_0       0x00
79#define WR_1       0x01
80#define WR_2       0x02
81#define WR_3       0x03
82#define WR_4       0x04
83#define WR_5       0x05
84#define WR_6       0x06
85#define WR_7       0x07
86#define WR_8       0x08
87#define WR_9       0x09
88#define WR_10      0x0A
89#define WR_11      0x0B
90#define WR_12      0x0C
91#define WR_13      0x0D
92#define WR_14      0x0E
93#define WR_15      0x0F
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif
Note: See TracBrowser for help on using the repository browser.