X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=pyfrprog.git;a=blobdiff_plain;f=pkernel%2Fuart.c;h=ec6f97ddb55cdf51b4ba8cbf3ba6c29945e3596f;hp=71eb44ba8f6dd33610c584a7c03686c6c0b934fc;hb=8917c5227c75dd57b787c3c283c4d63895e5d566;hpb=0488126f3e78ba8682488cfc49d232d2762dd90f diff --git a/pkernel/uart.c b/pkernel/uart.c index 71eb44b..ec6f97d 100644 --- a/pkernel/uart.c +++ b/pkernel/uart.c @@ -1,7 +1,6 @@ #include "mb91465k.h" #pragma section CODE=IRAM,attr=CODE -const char ASCII[] = "0123456789ABCDEF"; void InitUart4(void) { @@ -36,54 +35,3 @@ unsigned char Getch4(void) /* waits for and returns incomming char */ } } - -void Puts4(const char *Name2) -{ - volatile int i,len; - len = strlen(Name2); - - for(i=0; i> div)&0xF); /* get hex-digit value */ - Putch4(digit + ((digit < 0xA) ? '0' : 'A' - 0xA)); - div-=4; /* next digit shift */ - } -} - -void Putdec4(unsigned long x, int digits) -{ - int i; - char buf[10],sign=1; - - if (digits < 0) { /* should be print of zero? */ - digits *= (-1); - sign =1; - } - buf[digits]='\0'; /* end sign of string */ - - for (i=digits; i>0; i--) { - buf[i-1] = ASCII[x % 10]; // + '0' enough? :o - x = x/10; - } - - if (sign) { - for (i=0; buf[i]=='0'; i++) { /* no print of zero */ - if ( i