View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19195
|
|
Posted: Thu Nov 09, 2017 11:05 am |
|
|
The command to read a pin without changing it is 'output_state'.
if (output_state(PIN_B1)==0)
tests that pin B1 is low, without changing it to be an input. |
|
|
jacktaylor
Joined: 02 Sep 2017 Posts: 75
|
Thank you Ttelmah |
Posted: Fri Nov 10, 2017 9:42 am |
|
|
This if (output_state (PIN_B1) == 0) command does not appear in the ccs manual.
And when I enter it in my code, it presents error in the complication:
*** Error 12 "RelogDispl7Seg.c" Line 42 (22,23): Undefined identifier - output_state
Ttelmah wrote: | The command to read a pin without changing it is 'output_state'.
if (output_state(PIN_B1)==0)
tests that pin B1 is low, without changing it to be an input. |
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Nov 10, 2017 9:45 am |
|
|
It actually should be input_state(). Try that. That's in the manual. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19195
|
|
Posted: Fri Nov 10, 2017 9:49 am |
|
|
|
|
|
jacktaylor
Joined: 02 Sep 2017 Posts: 75
|
Thank you friend PCM programmer |
Posted: Sun Nov 12, 2017 3:31 pm |
|
|
Thank you friend PCM programmer
PCM programmer wrote: | It actually should be input_state(). Try that. That's in the manual. |
|
|
|
jacktaylor
Joined: 02 Sep 2017 Posts: 75
|
Thank you Ttelmah |
Posted: Sun Nov 12, 2017 3:32 pm |
|
|
Thank you friend Ttelmah
|
|
|
|