[BACK]Return to sausart.c CVS log [TXT][DIR] Up to [local] / funnyos / arch / sam7s64 / dev

Diff for /funnyos/arch/sam7s64/dev/sausart.c between version 1.1 and 1.3

version 1.1, 2007/11/24 15:04:49 version 1.3, 2008/01/06 18:15:03
Line 15 
Line 15 
 {  {
         /*          /*
          * Put a character into an unconfigured console.           * Put a character into an unconfigured console.
          * Note that USART0 (DBGU) should be already configured (clocks/un-pio, etc.).           * Note that USART1 should be already configured (clocks/un-pio, etc.).
          * Such configuration is done in config_machineinit().           * Such configuration is done in config_machineinit().
          */           */
   
         /* wait for previous character to transmit */          /* wait for previous character to transmit */
         while( ((*AT91C_US0_CSR) & AT91C_US_TXRDY) == 0)          while( ((*AT91C_US1_CSR) & AT91C_US_TXRDY) == 0)
                 ;                  ;
   
           /* if we encounter \n (LF), send \r\n (CRLF) */
           if (ch == '\n') {
   
                   *AT91C_US1_THR = 0x0d;
                   while( ((*AT91C_US1_CSR) & AT91C_US_TXRDY) == 0)
                           ;
   
                   *AT91C_US1_THR = 0x0a;
   
                   return;
           }
   
         /* put current character into Transmit Hold Register */          /* put current character into Transmit Hold Register */
         *AT91C_US0_THR = ((uint32_t)ch & 0x1ff);          *AT91C_US1_THR = ch;
 }  }
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

CVSweb