This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Connecting stdin and stdout to serial port...


Hi all,

I'm using gcc for the H8/3048, and am using the standard
C language libraries, and newlib.

To use scanf(), printf() etc, files need to be defined
for stdin and stdout. Somehow, these have to be connected
to the input and output of the rs232 serial port.

What's the usual way of doing this?

I currently have an array that gets filled by received
characters (interrupt driven), and an output array that
gets its contents emptied out the serial port when a
function triggers the tx interrupt. After the array
empties, the tx interrupt is disabled.

-- 
*******************************************
*   Russell Shaw, B.Eng, M.Eng(Research)  *
*      email: russell@webaxs.net          *
*      Australia                          *
*******************************************

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]