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

4.115
Last change on this file since 032e5e4 was 032e5e4, checked in by Anthony Green <green@…>, on 02/27/13 at 18:13:20

Add sample Moxie BSP for GDB sim

Signed-off-by: Anthony Green <green@…>

  • 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.com/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.