source: rtems/c/src/lib/libbsp/avr/avrtest/console/console-io.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

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 serial ports on the erc32.
4 *
5 *  COPYRIGHT (c) 1989-2008.
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.rtems.org/license/LICENSE.
11 */
12
13#include <bsp.h>
14#include <rtems/libio.h>
15#include <stdlib.h>
16#include <assert.h>
17
18#define STDIO_PORT      0x52
19#define EXIT_PORT       0x4F
20#define ABORT_PORT      0x49
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 */
39void console_outbyte_polled(
40  int  port,
41  char ch
42)
43{
44  *((volatile unsigned char *) STDIO_PORT) = ch;
45}
46
47/*
48 *  console_inbyte_nonblocking
49 *
50 *  This routine polls for a character.
51 */
52
53int console_inbyte_nonblocking(
54  int port
55)
56{
57  return -1;
58}
59
60#include <rtems/bspIo.h>
61
62void AVRsimBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
63
64BSP_output_char_function_type           BSP_output_char = AVRsimBSP_output_char;
65BSP_polling_getchar_function_type       BSP_poll_char = NULL;
Note: See TracBrowser for help on using the repository browser.