View previous topic :: View next topic |
Author |
Message |
Farzin_Benam
Joined: 07 Mar 2011 Posts: 1 Location: iran-tabriz
|
how to initialize all the ports and dont use any function? |
Posted: Mon Mar 07, 2011 2:58 am |
|
|
I'm new in c ccs, and I want to work with ports without the use of functions.
I'm writing a prototype header file for myself, and define all the things there, then include in each new project, but I face with problem even defining a name for a pin.
Can anyone guide me? |
|
![](templates/subSilver/images/spacer.gif) |
Eddy71ua
Joined: 23 Sep 2009 Posts: 55 Location: Ukraine
|
|
Posted: Mon Mar 07, 2011 7:21 am |
|
|
For example:
#DEFINE MyInputPIN PIN_B0; |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19365
|
|
Posted: Mon Mar 07, 2011 9:13 am |
|
|
At the end of the day, if there is no code, then there is no code....
You can, as Eddy has pointed out, define things, but these won't have any effect, till code is defined.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 07, 2011 5:29 pm |
|
|
Quote: | #DEFINE MyInputPIN PIN_B0;
|
Except don't put a semi-colon at the end of the line. |
|
![](templates/subSilver/images/spacer.gif) |
|