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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [h8300/] [h8sim/] [console/] [console-io.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
2
 *  This file contains the hardware specific portions of the TTY driver
3
 *  for the serial ports on the erc32.
4
 *
5
 *  COPYRIGHT (c) 1989-1997.
6
 *  On-Line Applications Research Corporation (OAR).
7
 *
8
 *  The license and distribution terms for this file may be
9
 *  found in the file LICENSE in this distribution or at
10
 *  http://www.OARcorp.com/rtems/license.html.
11
 *
12
 *  console-io.c,v 1.5 2002/01/04 18:14:03 joel Exp
13
 */
14
 
15
#include <bsp.h>
16
#include <rtems/libio.h>
17
#include <stdlib.h>
18
#include <assert.h>
19
 
20
/*
21
 *  console_initialize_hardware
22
 *
23
 *  This routine initializes the console hardware.
24
 *
25
 */
26
 
27
void console_initialize_hardware(void)
28
{
29
  return;
30
}
31
 
32
/*
33
 *  console_outbyte_polled
34
 *
35
 *  This routine transmits a character using polling.
36
 */
37
 
38
void console_outbyte_polled(
39
  int  port,
40
  char ch
41
)
42
{
43
  asm volatile( "mov.b #0,r1l ;  mov.b %0l,r2l ; jsr @@0xc4"
44
       :  : "r" (ch)  : "r1", "r2");
45
}
46
 
47
/*
48
 *  console_inbyte_nonblocking
49
 *
50
 *  This routine polls for a character.
51
 */
52
 
53
int console_inbyte_nonblocking(
54
  int port
55
)
56
{
57
  return -1;
58
}
59
 
60
#include <rtems/bspIo.h>
61
 
62
void H8simBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
63
 
64
BSP_output_char_function_type           BSP_output_char = H8simBSP_output_char;
65
BSP_polling_getchar_function_type       BSP_poll_char = NULL;
66
 
67
 

powered by: WebSVN 2.1.0

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