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

Port help..

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








Port help..
PostPosted: Fri Nov 27, 2009 12:26 pm     Reply with quote

is there any way to use a pin as parameter just like this, i am new to ccs

Quote:
void motor_forward(pin p)
{
ouput_high(p);
}




Thanks...
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Nov 27, 2009 12:33 pm     Reply with quote

This was one of the new features of the v4.0 compiler, see the output_high command in the manual for example code.
Guest








PostPosted: Fri Nov 27, 2009 12:36 pm     Reply with quote

Sorry for my question..

Code:
void motor_forward(pin1,pin2)
{
   output_high(pin1);
   output_low(pin2);
}
Guest








PostPosted: Fri Nov 27, 2009 12:37 pm     Reply with quote

it works
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