source: rtems/c/src/lib/libbsp/moxie/moxiesim/console/console-io.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  This file contains the hardware specific portions of the TTY driver
3 *  for the Moxie GDB simulator.
4 *
5 *  COPYRIGHT (c) 2011.
6 *  Anthony Green.
7 *
8 *  COPYRIGHT (c) 1989-2008.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 *
15 */
16
17#include <bsp.h>
18#include <rtems/libio.h>
19#include <stdlib.h>
20#include <assert.h>
21
22/*
23 *  console_initialize_hardware
24 *
25 *  This routine initializes the console hardware.
26 *
27 */
28
29void console_initialize_hardware(void)
30{
31  return;
32}
33
34/*
35 *  console_outbyte_polled
36 *
37 *  This routine transmits a character using polling.
38 */
39ssize_t _sys_write(int fd, const void *buf, size_t count);
40void console_outbyte_polled(
41  int  port,
42  char ch
43)
44{
45  _sys_write( 1, &ch, 1 );
46}
47
48/*
49 *  console_inbyte_nonblocking
50 *
51 *  This routine polls for a character.
52 */
53
54int console_inbyte_nonblocking(
55  int port
56)
57{
58  return -1;
59}
60
61#include <rtems/bspIo.h>
62
63void moxiesim_output_char(char c) { console_outbyte_polled( 0, c ); }
64
65BSP_output_char_function_type           BSP_output_char = moxiesim_output_char;
66BSP_polling_getchar_function_type       BSP_poll_char = NULL;
Note: See TracBrowser for help on using the repository browser.