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 support@ccsinfo.com

fputc()

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



Joined: 17 Aug 2009
Posts: 50

View user's profile Send private message

fputc()
PostPosted: Mon Aug 24, 2009 9:54 am     Reply with quote

Hey, just had a quick question. If I am transmitting something over RF, and have several fputc() statements one after another, does the function buffer/queue the data?

Or would i be force feeding it before it has time to pass through the UART?

My statements look like this at present:

Code:


                  fputc(NUL,COM_A);  //send out stream AAA
                  fputc(NUL,COM_A);
                  fputc(NUL,COM_A);
                  fputc(STX,COM_A);
                  fputc('A',COM_A);
                  fputc('A',COM_A);
                  fputc('A',COM_A);
                  fputc(CRC,COM_A); //send out checksum of 85
                  fputc(CR,COM_A);



thanks
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Aug 24, 2009 11:19 am     Reply with quote

The fputc() function won't return until the character is either put in the Xmit buffer for a hardware UART, or actually sent in the case of the CCS software UART.
_________________
The search for better is endless. Instead simply find very good and get the job done.
hobby_85



Joined: 17 Aug 2009
Posts: 50

View user's profile Send private message

PostPosted: Mon Aug 24, 2009 11:22 am     Reply with quote

cool. thanks for that.

back to debugging
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