/* #include #include void uart0_init( void ) { UFCON0 = ...; UMCON0 = ...; ULCON0 = ...; UBRDIV0 = ...; UCON0 = ...; } void uart0_putchar( char ch ) { while( ... ); UTXH0 = ...; } char uart0_getchar( void ) { while( ... ); return ...; } void uart0_puts( char *s ) { ... } void uart0_putint( int32 i ) { ... } void uart0_puthex( uint32 i ) { char buf[8 + 1]; char *p = buf + 8; uint8 c; *p = '\0'; do { c = i & 0xf; if( c < 10 ) *--p = '0' + c; else *--p = 'a' + c - 10; i = i >> 4; } while( i ); uart0_puts( p ); } void uart0_gets( char *s ) { ... } int32 uart0_getint( void ) { ... } uint32 uart0_gethex( void ) { ... } */