source: rtems/c/src/lib/libbsp/mips/malta/console/printk_support.c @ a36d1b4

4.115
Last change on this file since a36d1b4 was a36d1b4, checked in by Jennifer Averett <jennifer.averett@…>, on 04/04/12 at 17:21:15

Add MIPS/Malta BSP.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 *  @file
3 *
4 *  This file contains a stub for the required printk support.
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2012.
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#include <rtems.h>
17#include <bsp.h>
18#include <libchip/serial.h>
19#include <libchip/ns16550.h>
20
21rtems_device_minor_number         BSPPrintkPort = 0;
22
23void BSP_com_outch(char ch);
24int BSP_com_inch( void );
25
26/*
27 *  Following assume all are ns16650
28 */
29void BSP_com_outch(char ch)
30{
31  console_tbl                   *cptr;
32
33  cptr = &Console_Configuration_Ports[BSPPrintkPort];
34
35  return ns16550_outch_polled( cptr, ch );
36}
37
38int BSP_com_inch( void )
39{
40  int           result;
41  console_tbl   *cptr;
42
43  cptr = &Console_Configuration_Ports[BSPPrintkPort];
44
45  do {
46    result = ns16550_inch_polled( cptr );
47  } while (result == -1);
48
49  return result;
50}
51
52BSP_output_char_function_type     BSP_output_char = BSP_com_outch;
53BSP_polling_getchar_function_type BSP_poll_char = BSP_com_inch;
Note: See TracBrowser for help on using the repository browser.