diff options
| author | ssslady <[email protected]> | 2009-10-14 05:26:42 +0000 |
|---|---|---|
| committer | ssslady <[email protected]> | 2009-10-14 05:26:42 +0000 |
| commit | cdf794cc3a0cf6a65e12031a94115023f3bcb56f (patch) | |
| tree | 69e88207f26bfc23dd1c83ba06b62f2611c65de9 | |
| parent | 8d64046091b568078e92331fe74141113beda92a (diff) | |
mix data type bug,change console output function name for kt_printf
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@94 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | bsp/qemu/console.c | 20 | ||||
| -rw-r--r-- | bsp/qemu/serial.c | 1 |
2 files changed, 16 insertions, 5 deletions
diff --git a/bsp/qemu/console.c b/bsp/qemu/console.c index bf42ebbfa8..75418acd9d 100644 --- a/bsp/qemu/console.c +++ b/bsp/qemu/console.c @@ -17,9 +17,12 @@ #include <bsp.h> + +#include "serial.h" + static unsigned addr_6845; static rt_uint16_t *crt_buf; -static rt_int16 crt_pos; +static rt_int16_t crt_pos; extern void rt_serial_init(void); extern char rt_keyboard_getc(void); @@ -41,12 +44,12 @@ void rt_cga_init(void) rt_uint16_t was; rt_uint32_t pos; - cp = (short *) (CGA_BUF); + cp = (rt_uint16_t *) (CGA_BUF); was = *cp; *cp = (rt_uint16_t) 0xA55A; if (*cp != 0xA55A) { - cp = (rt_int16 *) (MONO_BUF); + cp = (rt_uint16_t *) (MONO_BUF); addr_6845 = MONO_BASE; } else @@ -104,7 +107,7 @@ static void rt_cga_putc(int c) if (crt_pos >= CRT_SIZE) { - rt_int32 i; + rt_int32_t i; rt_memcpy(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) << 1); for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i++) crt_buf[i] = 0x0700 | ' '; @@ -143,8 +146,15 @@ void rt_console_init(void) * invoked by rt_kprintf * * @param str the displayed string + * + * Modified: + * caoxl 2009-10-14 + * the name is change to rt_hw_console_output in the v0.3.0 + * */ -void rt_console_puts(const char* str) + +//void rt_console_puts(const char* str) +void rt_hw_console_output(const char* str) { while (*str) { diff --git a/bsp/qemu/serial.c b/bsp/qemu/serial.c index 9807c7b16e..f2484417e2 100644 --- a/bsp/qemu/serial.c +++ b/bsp/qemu/serial.c @@ -17,6 +17,7 @@ #include <rthw.h>
#include <bsp.h>
+extern char rt_keyboard_getc(void); /**
* @addtogroup QEMU
|
