OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [include/] [zilog/] [z8536.h] - Blame information for rev 609

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-1999.
14
 *  On-Line Applications Research Corporation (OAR).
15
 *
16
 *  The license and distribution terms for this file may be
17
 *  found in the file LICENSE in this distribution or at
18
 *  http://www.OARcorp.com/rtems/license.html.
19
 *
20
 *  $Id: z8536.h,v 1.2 2001-09-27 11:59:36 chris Exp $
21
 */
22
 
23
#ifndef __Z8536_h
24
#define __Z8536_h
25
 
26
#ifdef __cplusplus
27
extern "C" {
28
#endif
29
 
30
/* macros */
31
 
32
#define VOL8( ptr )   ((volatile rtems_unsigned8 *)(ptr))
33
 
34
#define Z8x36_STATE0 ( z8536 ) \
35
  { char *garbage; \
36
    (garbage) = *(VOL8(z8536+0xC)) \
37
  }
38
 
39
#define Z8x36_WRITE( z8536, reg, data ) \
40
   *(VOL8(z8536+0xC)) = (reg); \
41
   *(VOL8(z8536+0xC)) = (data)
42
 
43
#define Z8x36_READ( z8536, reg, data ) \
44
   *(VOL8(z8536+0xC)) = (reg); \
45
   (data) = *(VOL8(z8536+0xC))
46
 
47
/* structures */
48
 
49
/* MAIN CONTROL REGISTERS (0x00-0x07) */
50
#define MASTER_INTR           0x00   /* Master Interrupt Ctl Reg */
51
#define MASTER_CFG            0x01   /* Master Configuration Ctl Reg */
52
#define PORTA_VECTOR          0x02   /* Port A - Interrupt Vector */
53
#define PORTB_VECTOR          0x03   /* Port B - Interrupt Vector */
54
#define CNT_TMR_VECTOR        0x04   /* Counter/Timer Interrupt Vector */
55
#define PORTC_DATA_POLARITY   0x05   /* Port C - Data Path Polarity */
56
#define PORTC_DIRECTION       0x06   /* Port C - Data Direction */
57
#define PORTC_SPECIAL_IO_CTL  0x07   /* Port C - Special IO Control */
58
 
59
/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
60
#define PORTA_CMD_STATUS      0x08   /* Port A - Command Status Reg */
61
#define PORTB_CMD_STATUS      0x09   /* Port B - Command Status Reg */
62
#define CT1_CMD_STATUS        0x0a   /* Ctr/Timer 1 - Command Status Reg */
63
#define CT2_CMD_STATUS        0x0b   /* Ctr/Timer 2 - Command Status Reg */
64
#define CT3_CMD_STATUS        0x0c   /* Ctr/Timer 3 - Command Status Reg */
65
#define PORTA_DATA            0x0d   /* Port A - Data */
66
#define PORTB_DATA            0x0e   /* Port B - Data */
67
#define PORTC_DATA            0x0f   /* Port C - Data */
68
 
69
/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
70
#define CT1_CUR_CNT_MSB       0x10   /* Ctr/Timer 1 - Current Count (MSB) */
71
#define CT1_CUR_CNT_LSB       0x11   /* Ctr/Timer 1 - Current Count (LSB) */
72
#define CT2_CUR_CNT_MSB       0x12   /* Ctr/Timer 2 - Current Count (MSB) */
73
#define CT2_CUR_CNT_LSB       0x13   /* Ctr/Timer 2 - Current Count (LSB) */
74
#define CT3_CUR_CNT_MSB       0x14   /* Ctr/Timer 3 - Current Count (MSB) */
75
#define CT3_CUR_CNT_LSB       0x15   /* Ctr/Timer 3 - Current Count (LSB) */
76
#define CT1_TIME_CONST_MSB    0x16   /* Ctr/Timer 1 - Time Constant (MSB) */
77
#define CT1_TIME_CONST_LSB    0x17   /* Ctr/Timer 1 - Time Constant (LSB) */
78
#define CT2_TIME_CONST_MSB    0x18   /* Ctr/Timer 2 - Time Constant (MSB) */
79
#define CT2_TIME_CONST_LSB    0x19   /* Ctr/Timer 2 - Time Constant (LSB) */
80
#define CT3_TIME_CONST_MSB    0x1a   /* Ctr/Timer 3 - Time Constant (MSB) */
81
#define CT3_TIME_CONST_LSB    0x1b   /* Ctr/Timer 3 - Time Constant (LSB) */
82
#define CT1_MODE_SPEC         0x1c   /* Ctr/Timer 1 - Mode Specification  */
83
#define CT2_MODE_SPEC         0x1d   /* Ctr/Timer 2 - Mode Specification  */
84
#define CT3_MODE_SPEC         0x1e   /* Ctr/Timer 3 - Mode Specification  */
85
#define CURRENT_VECTOR        0x1f   /* Current Vector */
86
 
87
/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
88
#define PORTA_MODE            0x20   /* Port A - Mode Specification  */
89
#define PORTA_HANDSHAKE       0x21   /* Port A - Handshake Specification  */
90
#define PORTA_DATA_POLARITY   0x22   /* Port A - Data Path Polarity */
91
#define PORTA_DIRECTION       0x23   /* Port A - Data Direction */
92
#define PORTA_SPECIAL_IO_CTL  0x24   /* Port A - Special IO Control */
93
#define PORTA_PATT_POLARITY   0x25   /* Port A - Pattern Polarity */
94
#define PORTA_PATT_TRANS      0x26   /* Port A - Pattern Transition */
95
#define PORTA_PATT_MASK       0x27   /* Port A - Pattern Mask */
96
 
97
/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
98
#define PORTB_MODE            0x28   /* Port B - Mode Specification  */
99
#define PORTB_HANDSHAKE       0x29   /* Port B - Handshake Specification  */
100
#define PORTB_DATA_POLARITY   0x2a   /* Port B - Data Path Polarity */
101
#define PORTB_DIRECTION       0x2b   /* Port B - Data Direction */
102
#define PORTB_SPECIAL_IO_CTL  0x2c   /* Port B - Special IO Control */
103
#define PORTB_PATT_POLARITY   0x2d   /* Port B - Pattern Polarity */
104
#define PORTB_PATT_TRANS      0x2e   /* Port B - Pattern Transition */
105
#define PORTB_PATT_MASK       0x2f   /* Port B - Pattern Mask */
106
 
107
#ifdef __cplusplus
108
}
109
#endif
110
 
111
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.