source: rtems/c/src/lib/libbsp/powerpc/ppcn_60x/console/z85c30cfg.c @ 2e05348

4.104.114.84.95
Last change on this file since 2e05348 was 2e05348, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:52:29

2003-09-04 Joel Sherrill <joel@…>

  • clock/clock.c, console/console.c, console/debugio.c, console/ns16550cfg.c, console/ns16550cfg.h, console/z85c30cfg.c, console/z85c30cfg.h, include/tod.h, startup/bspstart.c, startup/genpvec.c, startup/rtems-ctor.cc, startup/setvec.c, timer/timer.c: URL for license changed.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  This file contains the console driver chip level routines for the
3 *  z85c30 chip.
4 *
5 *  COPYRIGHT (c) 1998 by Radstone Technology
6 *
7 *
8 * THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
9 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
10 * IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
11 * AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
12 *
13 * You are hereby granted permission to use, copy, modify, and distribute
14 * this file, provided that this notice, plus the above copyright notice
15 * and disclaimer, appears in all copies. Radstone Technology will provide
16 * no support for this code.
17 *
18 *  COPYRIGHT (c) 1989-1997.
19 *  On-Line Applications Research Corporation (OAR).
20 *
21 *  The license and distribution terms for this file may be
22 *  found in the file LICENSE in this distribution or at
23 *  http://www.rtems.com/license/LICENSE.
24 *
25 *  $Id$
26 */
27
28#include <rtems.h>
29#include <bsp.h>
30
31/*
32 *  Read_85c30_register
33 *
34 *  Read a Z85c30 register
35 */
36
37unsigned8 Read_85c30_register(
38  unsigned32  ulCtrlPort,
39  unsigned8   ucRegNum
40)
41{
42  unsigned8 ucData;
43
44  outport_byte(ulCtrlPort, ucRegNum);
45  inport_byte(ulCtrlPort, ucData);
46  return ucData;
47}
48
49/*
50 *  Write_85c30_register
51 *
52 *  Write a Z85c30 register
53 */
54
55void  Write_85c30_register(
56  unsigned32  ulCtrlPort,
57  unsigned8   ucRegNum,
58  unsigned8   ucData
59)
60{
61  if(ucRegNum) {
62    outport_byte(ulCtrlPort, ucRegNum);
63  }
64  outport_byte(ulCtrlPort, ucData);
65}
66
67/*
68 *  Read_85c30_data
69 *
70 *  Read a Z85c30 data register
71 */
72
73unsigned8 Read_85c30_data(
74  unsigned32  ulDataPort
75)
76{
77  unsigned8 ucData;
78
79  inport_byte(ulDataPort, ucData);
80  return ucData;
81}
82
83/*
84 *  Write_85c30_data
85 *
86 *  Write a Z85c30 data register
87 */
88
89void  Write_85c30_data(
90  unsigned32  ulDataPort,
91  unsigned8   ucData
92)
93{
94  outport_byte(ulDataPort, ucData);
95}
Note: See TracBrowser for help on using the repository browser.