2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, console/console-io.c, include/bsp.h:
This commit is contained in:
Joel Sherrill
2008-09-24 21:26:42 +00:00
parent db1424c9d9
commit cf03ba2ac2
4 changed files with 21 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, console/console-io.c, include/bsp.h:
2008-09-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Make letting boot_card() handle work area allocation

View File

@@ -31,8 +31,9 @@ startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bspstart.c startup/h8bdinstallirq.c \
../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c startup/__main.c
clock_SOURCES = ../../shared/clock_driver_stub.c
console_SOURCES = ../../shared/console-polled.c console/console-io.c
clock_SOURCES = ../../shared/clock_driver_simidle.c
console_SOURCES = ../../shared/console-polled.c console/console-io.c \
console/syscalls.S
timer_SOURCES = ../../shared/timerstub.c
noinst_LIBRARIES = libbsp.a

View File

@@ -34,14 +34,21 @@ void console_initialize_hardware(void)
*
* This routine transmits a character using polling.
*/
ssize_t _sys_write(int fd, const void *buf, size_t count);
void console_outbyte_polled(
int port,
char ch
)
{
asm volatile( "mov.b #0,r1l ; mov.b %0l,r2l ; jsr @@0xc4"
: : "r" (ch) : "r1", "r2");
_sys_write( 1, &ch, 1 );
/*
typedef void (*_write_p_t)(int, char *, int);
_write_p_t _write_p = (_write_p_t)0xc7;
_write_p( 1, &ch, 1 );
asm volatile( "mov.b #1,r1l ; mov.b %0l,r2l ; mov.b #1,r3l; jsr @@0xc7"
: : "r" (&ch) : "r1", "r2");
*/
}
/*

View File

@@ -27,6 +27,10 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/clockdrv.h>
/* support for simulated clock tick */
Thread clock_driver_sim_idle_body(uintptr_t);
#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
/*
* Simple spin delay in microsecond units for device drivers.
* This is very dependent on the clock speed of the target.