View previous topic :: View next topic |
Author |
Message |
chingB
Joined: 29 Dec 2003 Posts: 81
|
Using two(2) #use rs232 with stream? |
Posted: Sun Jan 11, 2004 6:11 pm |
|
|
Hi,
I am aware that you can use two(2) #use rs232 directive together with stream.
How can I use the printf function such that I can specify which rs232 to use? like if u are sending to lcd display u have syntax stated below:
printf(lcd_putc,"This is a sample text %lu",numb);
Anyone have done this method of printf function which you can be able to direct to a specific rs232 if two wer define in the program?
I need info, help or a code snippet will do....
Thank you. |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Sun Jan 11, 2004 8:05 pm |
|
|
I'm quoting this from the manual:
Quote: |
Syntax:
printf (fname, cstring, values...)
fprintf (stream, cstring, values...)
.
.
.
If fprintf() is used then the specified stream is used where printf() defaults to STDOUT (the last USE RS232).
|
You have to use fprintf if you want to specify streams. |
|
|
|