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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [ppcn_60x/] [console/] [z85c30cfg.c] - Blame information for rev 389

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

Line No. Rev Author Line
1 30 unneback
/*
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
 *  Copyright assigned to U.S. Government, 1994.
21
 *
22
 *  The license and distribution terms for this file may be
23
 *  found in the file LICENSE in this distribution or at
24
 *  http://www.OARcorp.com/rtems/license.html.
25
 *
26
 *  $Id: z85c30cfg.c,v 1.2 2001-09-27 12:00:49 chris Exp $
27
 */
28
 
29
#include <rtems.h>
30
#include <bsp.h>
31
 
32
/*
33
 *  Read_85c30_register
34
 *
35
 *  Read a Z85c30 register
36
 */
37
 
38
unsigned8 Read_85c30_register(
39
  unsigned32  ulCtrlPort,
40
  unsigned8   ucRegNum
41
)
42
{
43
  unsigned8 ucData;
44
 
45
  outport_byte(ulCtrlPort, ucRegNum);
46
  inport_byte(ulCtrlPort, ucData);
47
  return ucData;
48
}
49
 
50
/*
51
 *  Write_85c30_register
52
 *
53
 *  Write a Z85c30 register
54
 */
55
 
56
void  Write_85c30_register(
57
  unsigned32  ulCtrlPort,
58
  unsigned8   ucRegNum,
59
  unsigned8   ucData
60
)
61
{
62
  if(ucRegNum) {
63
    outport_byte(ulCtrlPort, ucRegNum);
64
  }
65
  outport_byte(ulCtrlPort, ucData);
66
}
67
 
68
/*
69
 *  Read_85c30_data
70
 *
71
 *  Read a Z85c30 data register
72
 */
73
 
74
unsigned8 Read_85c30_data(
75
  unsigned32  ulDataPort
76
)
77
{
78
  unsigned8 ucData;
79
 
80
  inport_byte(ulDataPort, ucData);
81
  return ucData;
82
}
83
 
84
/*
85
 *  Write_85c30_data
86
 *
87
 *  Write a Z85c30 data register
88
 */
89
 
90
void  Write_85c30_data(
91
  unsigned32  ulDataPort,
92
  unsigned8   ucData
93
)
94
{
95
  outport_byte(ulDataPort, ucData);
96
}

powered by: WebSVN 2.1.0

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