4.115
Last change
on this file since df40cc9 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 ep1a printk support routines |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 2011. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.org/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | #include <bsp.h> |
---|
13 | #include <rtems/libio.h> |
---|
14 | #include <stdlib.h> |
---|
15 | #include <assert.h> |
---|
16 | #include <termios.h> |
---|
17 | #include <rtems/bspIo.h> |
---|
18 | |
---|
19 | rtems_device_minor_number BSPPrintkPort = 0; |
---|
20 | |
---|
21 | /* const char arg to be compatible with BSP_output_char decl. */ |
---|
22 | void |
---|
23 | debug_putc_onlcr(const char c) |
---|
24 | { |
---|
25 | volatile int i; |
---|
26 | |
---|
27 | /* |
---|
28 | * Note: Hack to get printk to work. Depends upon bit |
---|
29 | * and silverchip to initialize the port and just |
---|
30 | * forces a character to be polled out of com1 |
---|
31 | * regardless of where the console is. |
---|
32 | */ |
---|
33 | |
---|
34 | volatile unsigned char *ptr = (void *)0xff800000; |
---|
35 | |
---|
36 | if ('\n'==c){ |
---|
37 | *ptr = '\r'; |
---|
38 | __asm__ volatile("sync"); |
---|
39 | for (i=0;i<0x0fff;i++); |
---|
40 | } |
---|
41 | |
---|
42 | *ptr = c; |
---|
43 | __asm__ volatile("sync"); |
---|
44 | for (i=0;i<0x0fff;i++); |
---|
45 | } |
---|
46 | |
---|
47 | BSP_output_char_function_type BSP_output_char = debug_putc_onlcr; |
---|
48 | BSP_polling_getchar_function_type BSP_poll_char = NULL; |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.