source: rtems/c/src/exec/libcsupport/include/zilog/z8536.h @ 28a4b1d

4.104.114.84.95
Last change on this file since 28a4b1d was 28a4b1d, checked in by Joel Sherrill <joel.sherrill@…>, on 08/04/97 at 21:39:07

moved from main include directory

  • Property mode set to 100644
File size: 4.7 KB
Line 
1/*  z8536.h
2 *
3 *  This include file defines information related to a Zilog Z8536
4 *  Counter/Timer/IO Chip.  It is a IO mapped part.
5 *
6 *  Input parameters:   NONE
7 *
8 *  Output parameters:  NONE
9 *
10 *  NOTE: This file shares as much as possible with the include
11 *        file for the Z8036 via z8x36.h.
12 *
13 *  COPYRIGHT (c) 1989-1997.
14 *  On-Line Applications Research Corporation (OAR).
15 *  Copyright assigned to U.S. Government, 1994.
16 *
17 *  The license and distribution terms for this file may in
18 *  the file LICENSE in this distribution or at
19 *  http://www.OARcorp.com/rtems/license.html.
20 *
21 *  $Id$
22 */
23
24#ifndef __Z8536_h
25#define __Z8536_h
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/* macros */
32
33#define VOL8( ptr )   ((volatile rtems_unsigned8 *)(ptr))
34
35#define Z8x36_STATE0 ( z8536 ) \
36  { char *garbage; \
37    (garbage) = *(VOL8(z8536+0xC)) \
38  }
39
40#define Z8x36_WRITE( z8536, reg, data ) \
41   *(VOL8(z8536+0xC)) = (reg); \
42   *(VOL8(z8536+0xC)) = (data)
43
44#define Z8x36_READ( z8536, reg, data ) \
45   *(VOL8(z8536+0xC)) = (reg); \
46   (data) = *(VOL8(z8536+0xC))
47
48/* structures */
49
50/* MAIN CONTROL REGISTERS (0x00-0x07) */
51#define MASTER_INTR           0x00   /* Master Interrupt Ctl Reg */
52#define MASTER_CFG            0x01   /* Master Configuration Ctl Reg */
53#define PORTA_VECTOR          0x02   /* Port A - Interrupt Vector */
54#define PORTB_VECTOR          0x03   /* Port B - Interrupt Vector */
55#define CNT_TMR_VECTOR        0x04   /* Counter/Timer Interrupt Vector */
56#define PORTC_DATA_POLARITY   0x05   /* Port C - Data Path Polarity */
57#define PORTC_DIRECTION       0x06   /* Port C - Data Direction */
58#define PORTC_SPECIAL_IO_CTL  0x07   /* Port C - Special IO Control */
59
60/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
61#define PORTA_CMD_STATUS      0x08   /* Port A - Command Status Reg */
62#define PORTB_CMD_STATUS      0x09   /* Port B - Command Status Reg */
63#define CT1_CMD_STATUS        0x0a   /* Ctr/Timer 1 - Command Status Reg */
64#define CT2_CMD_STATUS        0x0b   /* Ctr/Timer 2 - Command Status Reg */
65#define CT3_CMD_STATUS        0x0c   /* Ctr/Timer 3 - Command Status Reg */
66#define PORTA_DATA            0x0d   /* Port A - Data */
67#define PORTB_DATA            0x0e   /* Port B - Data */
68#define PORTC_DATA            0x0f   /* Port C - Data */
69
70/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
71#define CT1_CUR_CNT_MSB       0x10   /* Ctr/Timer 1 - Current Count (MSB) */
72#define CT1_CUR_CNT_LSB       0x11   /* Ctr/Timer 1 - Current Count (LSB) */
73#define CT2_CUR_CNT_MSB       0x12   /* Ctr/Timer 2 - Current Count (MSB) */
74#define CT2_CUR_CNT_LSB       0x13   /* Ctr/Timer 2 - Current Count (LSB) */
75#define CT3_CUR_CNT_MSB       0x14   /* Ctr/Timer 3 - Current Count (MSB) */
76#define CT3_CUR_CNT_LSB       0x15   /* Ctr/Timer 3 - Current Count (LSB) */
77#define CT1_TIME_CONST_MSB    0x16   /* Ctr/Timer 1 - Time Constant (MSB) */
78#define CT1_TIME_CONST_LSB    0x17   /* Ctr/Timer 1 - Time Constant (LSB) */
79#define CT2_TIME_CONST_MSB    0x18   /* Ctr/Timer 2 - Time Constant (MSB) */
80#define CT2_TIME_CONST_LSB    0x19   /* Ctr/Timer 2 - Time Constant (LSB) */
81#define CT3_TIME_CONST_MSB    0x1a   /* Ctr/Timer 3 - Time Constant (MSB) */
82#define CT3_TIME_CONST_LSB    0x1b   /* Ctr/Timer 3 - Time Constant (LSB) */
83#define CT1_MODE_SPEC         0x1c   /* Ctr/Timer 1 - Mode Specification  */
84#define CT2_MODE_SPEC         0x1d   /* Ctr/Timer 2 - Mode Specification  */
85#define CT3_MODE_SPEC         0x1e   /* Ctr/Timer 3 - Mode Specification  */
86#define CURRENT_VECTOR        0x1f   /* Current Vector */
87
88/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
89#define PORTA_MODE            0x20   /* Port A - Mode Specification  */
90#define PORTA_HANDSHAKE       0x21   /* Port A - Handshake Specification  */
91#define PORTA_DATA_POLARITY   0x22   /* Port A - Data Path Polarity */
92#define PORTA_DIRECTION       0x23   /* Port A - Data Direction */
93#define PORTA_SPECIAL_IO_CTL  0x24   /* Port A - Special IO Control */
94#define PORTA_PATT_POLARITY   0x25   /* Port A - Pattern Polarity */
95#define PORTA_PATT_TRANS      0x26   /* Port A - Pattern Transition */
96#define PORTA_PATT_MASK       0x27   /* Port A - Pattern Mask */
97
98/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
99#define PORTB_MODE            0x28   /* Port B - Mode Specification  */
100#define PORTB_HANDSHAKE       0x29   /* Port B - Handshake Specification  */
101#define PORTB_DATA_POLARITY   0x2a   /* Port B - Data Path Polarity */
102#define PORTB_DIRECTION       0x2b   /* Port B - Data Direction */
103#define PORTB_SPECIAL_IO_CTL  0x2c   /* Port B - Special IO Control */
104#define PORTB_PATT_POLARITY   0x2d   /* Port B - Pattern Polarity */
105#define PORTB_PATT_TRANS      0x2e   /* Port B - Pattern Transition */
106#define PORTB_PATT_MASK       0x2f   /* Port B - Pattern Mask */
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif
Note: See TracBrowser for help on using the repository browser.