Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Wed Feb 24, 2016 1:42 am |
|
|
Nothing to do with the interrupt. Just general C. A function _or it's prototype_, must be defined before you can call it. You need to add a function prototype for the code you want to call, before you define the interrupt function.
General comments. Where on earth is the label you are trying to goto?. If this is somewhere else in the code, then you will almost certainly result in a stack imbalance. Result code crashing....
However the code is not going to work, for several more reasons. an int in CCS, is an 8 bit integer. Can this ever get to 6000?. Then you are setting i to zero every time the interrupt is called, so again it is never going to get to 6000....
Rethink how this is done. You need to declare i as a static int16 (which will then only be initialised once, and can count to 6000). Then have the code just set a flag to say that the sensing is required, and do the sensing in your main code. |
|