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

Subversion Repositories or1k

[/] [or1k/] [tags/] [alpha/] [newlib/] [libgloss/] [mips/] [dvemon.c] - Blame information for rev 81

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

Line No. Rev Author Line
1 39 lampret
/* dve.c -- I/O code for the Densan DVE-R3900 board.
2
 *
3
 * Copyright (c) 1998 Cygnus Support
4
 *
5
 * The authors hereby grant permission to use, copy, modify, distribute,
6
 * and license this software and its documentation for any purpose, provided
7
 * that existing copyright notices are retained in all copies and that this
8
 * notice is included verbatim in any distributions. No written agreement,
9
 * license, or royalty fee is required for any of the authorized uses.
10
 * Modifications to this software may be copyrighted by their authors
11
 * and need not follow the licensing terms described here, provided that
12
 * the new terms are clearly indicated on the first page of each file where
13
 * they apply.
14
 */
15
 
16
/* Flag indicating that we are being debugged by GDB.  If set,
17
   preceded each character output to the console with a ^O,
18
   so that GDB will print it instead of discarding it.  */
19
 
20
int output_debug = 1;
21
 
22
/* Monitor "ci" function (console input) */
23
 
24
typedef int (*cifunc)(int waitflag);
25
static cifunc ci = (cifunc) 0xbfc00010;
26
 
27
#define WAIT    1
28
#define NOWAIT  0 
29
#define NOCHAR  (-1)
30
 
31
/* Monitor "co" function (console output) */
32
 
33
typedef void (*cofunc)(int c);
34
static cofunc co = (cofunc) 0xbfc00018;
35
 
36
/*  outbyte -- shove a byte out the serial port; used by write.c.  */
37
 
38
int
39
outbyte(byte)
40
     unsigned char byte;
41
{
42
  /* Output a ^O prefix so that GDB won't discard the output.  */
43
  if (output_debug)
44
    co (0x0f);
45
 
46
  co (byte);
47
  return byte;
48
}
49
 
50
/* inbyte -- get a byte from the serial port; used by read.c.  */
51
 
52
unsigned char
53
inbyte()
54
{
55
  return (unsigned char) ci (WAIT);
56
}
57
 
58
 
59
/* Structure filled in by get_mem_info.  Only the size field is
60
   actually used (by sbrk), so the others aren't even filled in.  */
61
 
62
struct s_mem
63
{
64
  unsigned int size;
65
  unsigned int icsize;
66
  unsigned int dcsize;
67
};
68
 
69
 
70
void
71
get_mem_info (mem)
72
     struct s_mem *mem;
73
{
74
  mem->size = 0x1000000;        /* DVE-R3900 board has 16 MB of RAM */
75
}
76
 
77
 
78
/* close function is a dummy for this target.  */
79
 
80
int close (fd)
81
     int fd;
82
{
83
  return 0;
84
}
85
 

powered by: WebSVN 2.1.0

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