From 07ac5def3b1c83a21472e3615e295c47bc7690d2 Mon Sep 17 00:00:00 2001 From: xiangfu Date: Thu, 24 Jul 2008 23:12:37 -0400 Subject: [PATCH] change serial_puti to serial_putc --- qiboot/include/serial.h | 6 +----- qiboot/src/serial.c | 4 ++-- qiboot/src/start_kboot.c | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/qiboot/include/serial.h b/qiboot/include/serial.h index 053c712..9ec35f5 100644 --- a/qiboot/include/serial.h +++ b/qiboot/include/serial.h @@ -23,10 +23,6 @@ #define rUTXH0 (*(volatile unsigned char *)0x50000023) #define UTRSTAT (*(volatile unsigned char *)0x50000010) -/* -#define PUT_CHAR() (rUTXH0 -#define ORANGE_OFF() (GPBDAT &= ~(0x1)) -*/ +void serial_putc (const char c); -void serial_puti (const int i); diff --git a/qiboot/src/serial.c b/qiboot/src/serial.c index 66fe066..83322e5 100644 --- a/qiboot/src/serial.c +++ b/qiboot/src/serial.c @@ -25,9 +25,9 @@ /* * Output a single byte to the serial port. */ -void serial_puti (const int i) +void serial_putc (const char c) { while (!(UTRSTAT & 0x2)); - rUTXH0 |= i; + rUTXH0 = c; } diff --git a/qiboot/src/start_kboot.c b/qiboot/src/start_kboot.c index 935be30..caf98b8 100644 --- a/qiboot/src/start_kboot.c +++ b/qiboot/src/start_kboot.c @@ -40,7 +40,7 @@ unsigned char buf[2048]; int start_kboot(void) { /*1 say hello to uart */ - serial_puti (123); + serial_putc ('a'); blue_on(1); /*2. test nand flash */ if(nand_read_ll(buf, 0x40000, sizeof(buf))==-1) {