source: rtems/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.c @ 0f61336

4.104.114.84.95
Last change on this file since 0f61336 was 0f61336, checked in by Joel Sherrill <joel.sherrill@…>, on 07/15/98 at 19:28:29

Added comments.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  This file contains the console driver chip level routines for the
3 *  z85c30 chip.
4 *
5 *  COPYRIGHT (c) 1989-1997.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#include <rtems.h>
17#include <bsp.h>
18
19/*PAGE
20 *
21 *  Read_z85c30_register
22 */
23
24unsigned8 Read_z85c30_register(
25  unsigned32  ulCtrlPort,
26  unsigned8   ucRegNum
27)
28{
29  unsigned8 *port;
30
31  port = (unsigned8 *)ulCtrlPort;
32
33  if(ucRegNum) {
34    *port = ucRegNum;
35  }
36  return *port;
37
38}
39
40/*PAGE
41 *
42 *  Write_z85c30_register
43 */
44
45void  Write_z85c30_register(
46  unsigned32  ulCtrlPort,
47  unsigned8   ucRegNum,
48  unsigned8   ucData
49)
50{
51  unsigned8 *port;
52
53  port = (unsigned8 *)ulCtrlPort;
54
55  if(ucRegNum) {
56    *port = ucRegNum;
57  }
58  *port = ucData;
59}
60
61/*PAGE
62 *
63 *  Read_z85c30_data
64 */
65
66unsigned8 Read_z85c30_data(
67  unsigned32  ulDataPort
68)
69{
70  unsigned8 *port;
71
72  port = (unsigned8 *)ulDataPort;
73  return *port;
74}
75
76/*PAGE
77 *
78 *  Write_z85c30_data
79 */
80
81void  Write_z85c30_data(
82  unsigned32  ulDataPort,
83  unsigned8   ucData
84)
85{
86  unsigned8 *port;
87
88  port = (unsigned8 *)ulDataPort;
89  *port = ucData;
90}
91
92
93
94
95
96
Note: See TracBrowser for help on using the repository browser.