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
This commit is contained in:
ssslady 2009-10-14 05:26:42 +00:00
parent 8d64046091
commit cdf794cc3a
2 changed files with 16 additions and 5 deletions

View File

@ -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)
{

View File

@ -17,6 +17,7 @@
#include <rthw.h>
#include <bsp.h>
extern char rt_keyboard_getc(void);
/**
* @addtogroup QEMU