diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-04-18 10:52:21 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-04-22 08:37:01 -0500 |
commit | a531683ae99448696a29127a056e126493fe1e37 (patch) | |
tree | 53a55c23a7212233a04bff8d9eba9079281dcd89 /c/src/lib/libbsp/sh/shsim/trap34 | |
parent | bsps: Fix TLS support in linker command files (diff) | |
download | rtems-a531683ae99448696a29127a056e126493fe1e37.tar.bz2 |
shsim: Add printk() support and move all code to console subdirectory
Diffstat (limited to 'c/src/lib/libbsp/sh/shsim/trap34')
-rw-r--r-- | c/src/lib/libbsp/sh/shsim/trap34/console-io.c | 72 | ||||
-rw-r--r-- | c/src/lib/libbsp/sh/shsim/trap34/console-support.S | 18 |
2 files changed, 0 insertions, 90 deletions
diff --git a/c/src/lib/libbsp/sh/shsim/trap34/console-io.c b/c/src/lib/libbsp/sh/shsim/trap34/console-io.c deleted file mode 100644 index b327192d5d..0000000000 --- a/c/src/lib/libbsp/sh/shsim/trap34/console-io.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file contains the hardware specific portions of the TTY driver - * for the simulators stdin/out. - * - * Logic based on newlib-1.8.2/newlib/libc/sys/sh/syscalls.c - * - * COPYRIGHT (c) 1989-2011. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#include <bsp.h> -#include <rtems/libio.h> -#include <stdlib.h> -#include <assert.h> - -#include <bsp/syscall.h> - -int errno; - -extern int __trap34(int, int, void*, int ); - -/* - * console_initialize_hardware - * - * This routine initializes the console hardware. - * - */ - -void console_initialize_hardware(void) -{ - return; -} - -/* - * console_outbyte_polled - * - * This routine transmits a character using polling. - */ - -void console_outbyte_polled( - int port, - char ch -) -{ - __trap34 (SYS_write, 1, &ch, 1); - return; -} - -/* - * console_inbyte_nonblocking - * - * This routine polls for a character. - */ - -int console_inbyte_nonblocking( - int port -) -{ - unsigned char c; - - return __trap34 (SYS_read, 0, &c, 1); -} - -/* XXX wrong place for this */ -int _sys_exit (int n) -{ - return __trap34 (SYS_exit, n, 0, 0); -} diff --git a/c/src/lib/libbsp/sh/shsim/trap34/console-support.S b/c/src/lib/libbsp/sh/shsim/trap34/console-support.S deleted file mode 100644 index 63f72f794b..0000000000 --- a/c/src/lib/libbsp/sh/shsim/trap34/console-support.S +++ /dev/null @@ -1,18 +0,0 @@ -/* - * newlib-1.8.2/newlib/libc/sys/sh/trap.S - */ - .text - .global ___trap34 -___trap34: - trapa #34 - tst r1,r1 ! r1 is errno - bt ret - mov.l perrno,r2 - mov.l r1,@r2 -ret: - rts - nop - - .align 2 -perrno: - .long _errno |