Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] UART0 and Printf

2006-04-24 by mfrazier@governors-america.com

You need to create a link to the printf ( )  function with writing a 
putchar( ) function that links to your Comm write functions so that printf 
( ) can link to the comm port such as:

/************************************************************************************************************************
Name:       putchar
Descr:      This routine is called by printf to output character strings 
to the
                                console. The function sends data out com1.

Inputs:     INT_32  ch = character to send to serial port
Outputs:    INT_32 status -   0 = Character written OK
 1 = Error
Rev:        0
************************************************************************************************************************/
INT_32 putchar ( INT_32 ch )
{
        return(Com1_write(ch));  // Write character to Serial Port
} 


Goog Luck!

Mike F.

[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.