CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Using two(2) #use rs232 with stream?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
chingB



Joined: 29 Dec 2003
Posts: 81

View user's profile Send private message

Using two(2) #use rs232 with stream?
PostPosted: Sun Jan 11, 2004 6:11 pm     Reply with quote

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. Razz Cool
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Sun Jan 11, 2004 8:05 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group