RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
include
rtems
zilog
z8036.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
14
15
/*
16
* COPYRIGHT (c) 1989-2011.
17
* On-Line Applications Research Corporation (OAR).
18
*
19
* Redistribution and use in source and binary forms, with or without
20
* modification, are permitted provided that the following conditions
21
* are met:
22
* 1. Redistributions of source code must retain the above copyright
23
* notice, this list of conditions and the following disclaimer.
24
* 2. Redistributions in binary form must reproduce the above copyright
25
* notice, this list of conditions and the following disclaimer in the
26
* documentation and/or other materials provided with the distribution.
27
*
28
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
* POSSIBILITY OF SUCH DAMAGE.
39
*/
40
41
#ifndef _RTEMS_ZILOG_Z8036_H
42
#define _RTEMS_ZILOG_Z8036_H
43
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
48
/* macros */
49
50
#define Z8036( ptr ) ((volatile struct z8036_map *)(ptr))
51
52
#define Z8x36_STATE0 ( z8036 ) \
53
{
/*char *garbage = *(Z8036(z8036))->???; */
}
54
55
56
#define Z8x36_WRITE( z8036, reg, data ) \
57
(Z8036(z8036))->reg = (data)
58
59
60
#define Z8x36_READ( z8036, reg, data ) \
61
(Z8036(z8036))->reg = (data)
62
63
/* structures */
64
65
struct
z8036_map
{
66
/* MAIN CONTROL REGISTERS (0x00-0x07) */
67
uint8_t MASTER_INTR;
/* Master Interrupt Ctl Reg */
68
uint8_t MASTER_CFG;
/* Master Configuration Ctl Reg */
69
uint8_t PORTA_VECTOR;
/* Port A - Interrupt Vector */
70
uint8_t PORTB_VECTOR;
/* Port B - Interrupt Vector */
71
uint8_t CNT_TMR_VECTOR;
/* Counter/Timer Interrupt Vector */
72
uint8_t PORTC_DATA_POLARITY;
/* Port C - Data Path Polarity */
73
uint8_t PORTC_DIRECTION;
/* Port C - Data Direction */
74
uint8_t PORTC_SPECIAL_IO_CTL;
/* Port C - Special IO Control */
75
/* MOST OFTEN ACCESSED REGISTERS (0x08 - 0x0f) */
76
uint8_t PORTA_CMD_STATUS;
/* Port A - Command Status Reg */
77
uint8_t PORTB_CMD_STATUS;
/* Port B - Command Status Reg */
78
uint8_t CT1_CMD_STATUS;
/* Ctr/Timer 1 - Command Status Reg */
79
uint8_t CT2_CMD_STATUS;
/* Ctr/Timer 2 - Command Status Reg */
80
uint8_t CT3_CMD_STATUS;
/* Ctr/Timer 3 - Command Status Reg */
81
uint8_t PORTA_DATA;
/* Port A - Data */
82
uint8_t PORTB_DATA;
/* Port B - Data */
83
uint8_t PORTC_DATA;
/* Port C - Data */
84
/* COUNTER/TIMER RELATED REGISTERS (0x10-0x1f) */
85
uint8_t CT1_CUR_CNT_MSB;
/* Ctr/Timer 1 - Current Count (MSB) */
86
uint8_t CT1_CUR_CNT_LSB;
/* Ctr/Timer 1 - Current Count (LSB) */
87
uint8_t CT2_CUR_CNT_MSB;
/* Ctr/Timer 2 - Current Count (MSB) */
88
uint8_t CT2_CUR_CNT_LSB;
/* Ctr/Timer 2 - Current Count (LSB) */
89
uint8_t CT3_CUR_CNT_MSB;
/* Ctr/Timer 3 - Current Count (MSB) */
90
uint8_t CT3_CUR_CNT_LSB;
/* Ctr/Timer 3 - Current Count (LSB) */
91
uint8_t CT1_TIME_CONST_MSB;
/* Ctr/Timer 1 - Time Constant (MSB) */
92
uint8_t CT1_TIME_CONST_LSB;
/* Ctr/Timer 1 - Time Constant (LSB) */
93
uint8_t CT2_TIME_CONST_MSB;
/* Ctr/Timer 2 - Time Constant (MSB) */
94
uint8_t CT2_TIME_CONST_LSB;
/* Ctr/Timer 2 - Time Constant (LSB) */
95
uint8_t CT3_TIME_CONST_MSB;
/* Ctr/Timer 3 - Time Constant (MSB) */
96
uint8_t CT3_TIME_CONST_LSB;
/* Ctr/Timer 3 - Time Constant (LSB) */
97
uint8_t CT1_MODE_SPEC;
/* Ctr/Timer 1 - Mode Specification */
98
uint8_t CT2_MODE_SPEC;
/* Ctr/Timer 2 - Mode Specification */
99
uint8_t CT3_MODE_SPEC;
/* Ctr/Timer 3 - Mode Specification */
100
uint8_t CURRENT_VECTOR;
/* Current Vector */
101
/* PORT A SPECIFICATION REGISTERS (0x20 -0x27) */
102
uint8_t PORTA_MODE;
/* Port A - Mode Specification */
103
uint8_t PORTA_HANDSHAKE;
/* Port A - Handshake Specification */
104
uint8_t PORTA_DATA_POLARITY;
/* Port A - Data Path Polarity */
105
uint8_t PORTA_DIRECTION;
/* Port A - Data Direction */
106
uint8_t PORTA_SPECIAL_IO_CTL;
/* Port A - Special IO Control */
107
uint8_t PORTA_PATT_POLARITY;
/* Port A - Pattern Polarity */
108
uint8_t PORTA_PATT_TRANS;
/* Port A - Pattern Transition */
109
uint8_t PORTA_PATT_MASK;
/* Port A - Pattern Mask */
110
/* PORT B SPECIFICATION REGISTERS (0x28-0x2f) */
111
uint8_t PORTB_MODE;
/* Port B - Mode Specification */
112
uint8_t PORTB_HANDSHAKE;
/* Port B - Handshake Specification */
113
uint8_t PORTB_DATA_POLARITY;
/* Port B - Data Path Polarity */
114
uint8_t PORTB_DIRECTION;
/* Port B - Data Direction */
115
uint8_t PORTB_SPECIAL_IO_CTL;
/* Port B - Special IO Control */
116
uint8_t PORTB_PATT_POLARITY;
/* Port B - Pattern Polarity */
117
uint8_t PORTB_PATT_TRANS;
/* Port B - Pattern Transition */
118
uint8_t PORTB_PATT_MASK;
/* Port B - Pattern Mask */
119
};
120
121
#ifdef __cplusplus
122
}
123
#endif
124
125
#endif
z8036_map
Definition
z8036.h:65
Generated by
1.18.0