www.pudn.com > at91rm9200_test.rar > console.c


#include  
#include  
#include  
 
//==================================================================== 
void puts(char *pt) 
{ 
    while(*pt) 
        putch(*pt++); 
} 
 
//If you don't use vsprintf(), the code size is reduced very much. 
typedef int *__va_list[1]; 
int vsprintf(char * /*s*/, const char * /*format*/, __va_list /*arg*/); 
 
void printf(char *fmt,...) 
{ 
    va_list ap; 
    char string[256]; 
 
    va_start(ap,fmt); 
    vsprintf(string,fmt,ap); 
    puts(string); 
    va_end(ap); 
}