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

how to make a pointer to const struct in ccs

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








how to make a pointer to const struct in ccs
PostPosted: Sat Sep 04, 2004 2:14 am     Reply with quote

i like work with pointer with const struct for not using ram.
but the ccs can't do this.what should i do?
bdavis



Joined: 31 May 2004
Posts: 86
Location: Colorado Springs, CO

View user's profile Send private message

PostPosted: Sat Sep 04, 2004 8:55 am     Reply with quote

I use strcpy(), which will accept a pointer to const for the second argument. If the function you are sending the pointer to only needs to operate on chars, then you can send a string of chars in one call, and CCS will call the routine for each char in the string. That is how printf() works in CCS. I also found that putting an array of strings in ram was taking two bytes per char - don't know why, but very expensive use of ram, so I put them all in Flash/Rom.
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