this commit won't work :(
[pyfrprog.git] / pkernel / uart.c
index 0c528ddfc1922afe4be1ecf225b086b9d45cc8a9..738ff46f0fa30b572137845b052fb2491d10fbe6 100644 (file)
@@ -12,8 +12,8 @@ void InitUart4(void)
 {
   // Initialize UART asynchronous mode
   // BGR04 = 1666; //  9600 Baud @ 16MHz
-     BGR04 = 832;  // 19200 Baud @ 16MHz
-  // BGR04 = 416;  // 38400 Baud @ 16MHz
+  // BGR04 = 832;  // 19200 Baud @ 16MHz
+  BGR04 = 416;  // 38400 Baud @ 16MHz
 
   // BGR04 = 2083; //  9600 Baud @ 20MHz
   // BGR04 = 1041; // 19200 Baud @ 20MHz
@@ -29,13 +29,13 @@ void InitUart4(void)
   EPFR19 = 0x00;   // enable UART
 }
 
-void Putch4(char ch)         /* sends a char */
+void Putch4(unsigned char ch)         /* sends a char */
 {
   while (SSR04_TDRE == 0);    /* wait for transmit buffer empty        */
   TDR04 = ch;                 /* put ch into buffer                    */
 }
 
-char Getch4(void)            /* waits for and returns incomming char   */
+unsigned char Getch4(void)            /* waits for and returns incomming char  */
 {
   volatile unsigned ch;
 
@@ -125,5 +125,3 @@ void Putdec4(unsigned long x, int digits)
        Puts4(buf);                                     /* send string */
 }
 
-
-