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

functions, C code question

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



Joined: 16 Feb 2005
Posts: 25

View user's profile Send private message

functions, C code question
PostPosted: Wed Jul 19, 2006 12:41 pm     Reply with quote

Please let me know if can do something like this ? or what is a better way of doing it...

What iam doing is fairly compliacted I have to call the functions few number of times with different PIN variables?
Below is stripped down version.

Thanks,

Code:

#define P PIN_A0
#define Q PIN_A1
#define R PIN_A2
#define S PIN_A3

int8 myfunc(const X, const Y){
   int8 Z;
   output_high(X);
   Z = input(Y);
                return Z;
}

void main(void){
   myfunc(P, Q);
   myfunc(R, S);
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 19, 2006 12:51 pm     Reply with quote

The do_pin_io() function lets you pass a CCS pin number as a variable.
See this post for the code:
http://www.ccsinfo.com/forum/viewtopic.php?t=25280&start=4
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