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

Annotation of funnyos/arch/sam7s64/dev/sausart.c, Revision 1.1

1.1     ! nbrk        1: /*
        !             2:  * $Id$
        !             3:  */
        !             4: #include <sys/types.h>
        !             5: #include <sys/device.h>
        !             6:
        !             7: #include <arch/sam7s64/dev/at91sam7.h>
        !             8:
        !             9: /*
        !            10:  * driver for USART.
        !            11:  */
        !            12:
        !            13: void
        !            14: sausart_early_putchar(char ch)
        !            15: {
        !            16:        /*
        !            17:         * Put a character into an unconfigured console.
        !            18:         * Note that USART0 (DBGU) should be already configured (clocks/un-pio, etc.).
        !            19:         * Such configuration is done in config_machineinit().
        !            20:         */
        !            21:
        !            22:        /* wait for previous character to transmit */
        !            23:        while( ((*AT91C_US0_CSR) & AT91C_US_TXRDY) == 0)
        !            24:                ;
        !            25:
        !            26:        /* put current character into Transmit Hold Register */
        !            27:        *AT91C_US0_THR = ((uint32_t)ch & 0x1ff);
        !            28: }
        !            29:

CVSweb