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

Subversion Repositories openrisc_me

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

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

Line No. Rev Author Line
1 30 unneback
/*  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-1999.
11
 *  On-Line Applications Research Corporation (OAR).
12
 *
13
 *  The license and distribution terms for this file may be
14
 *  found in the file LICENSE in this distribution or at
15
 *  http://www.OARcorp.com/rtems/license.html.
16
 *
17
 *  $Id: z8530.h,v 1.2 2001-09-27 11:59:36 chris Exp $
18
 */
19
 
20
#ifndef __Z8530_h
21
#define __Z8530_h
22
 
23
#ifdef __cplusplus
24
extern "C" {
25
#endif
26
 
27
/* macros */
28
 
29
#define VOL8( ptr )   ((volatile rtems_unsigned8 *)(ptr))
30
 
31
#define Z8x30_STATE0 ( z8530 ) \
32
  { char *garbage; \
33
    (garbage) = *(VOL8(z8530)) \
34
  }
35
 
36
#define Z8x30_WRITE_CONTROL( z8530, reg, data ) \
37
   *(VOL8(z8530)) = (reg); \
38
   *(VOL8(z8530)) = (data)
39
 
40
#define Z8x30_READ_CONTROL( z8530, reg, data ) \
41
   *(VOL8(z8530)) = (reg); \
42
   (data) = *(VOL8(z8530))
43
 
44
#define Z8x30_WRITE_DATA( z8530, data ) \
45
   *(VOL8(z8530)) = (data);
46
 
47
#define Z8x30_READ_DATA( z8530, data ) \
48
   (data) = *(VOL8(z8530));
49
 
50
 
51
/* RR_0 Bit Definitions */
52
 
53
#define RR_0_TX_BUFFER_EMPTY   0x04
54
#define RR_0_RX_DATA_AVAILABLE 0x01
55
 
56
/* read registers */
57
 
58
#define RR_0       0x00
59
#define RR_1       0x01
60
#define RR_2       0x02
61
#define RR_3       0x03
62
#define RR_4       0x04
63
#define RR_5       0x05
64
#define RR_6       0x06
65
#define RR_7       0x07
66
#define RR_8       0x08
67
#define RR_9       0x09
68
#define RR_10      0x0A
69
#define RR_11      0x0B
70
#define RR_12      0x0C
71
#define RR_13      0x0D
72
#define RR_14      0x0E
73
#define RR_15      0x0F
74
 
75
/* write registers */
76
 
77
#define WR_0       0x00
78
#define WR_1       0x01
79
#define WR_2       0x02
80
#define WR_3       0x03
81
#define WR_4       0x04
82
#define WR_5       0x05
83
#define WR_6       0x06
84
#define WR_7       0x07
85
#define WR_8       0x08
86
#define WR_9       0x09
87
#define WR_10      0x0A
88
#define WR_11      0x0B
89
#define WR_12      0x0C
90
#define WR_13      0x0D
91
#define WR_14      0x0E
92
#define WR_15      0x0F
93
 
94
#ifdef __cplusplus
95
}
96
#endif
97
 
98
#endif

powered by: WebSVN 2.1.0

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