Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
Error 40
I am struggling with the above error - hope someone can point me in the right direction
<<code int RC5_start; int RC5_system; Format 1 E/N t s4 s3 s3 s1 s0 int RC5_command; Format 0 0 c5 c4 c3 c2 c1 c0 int RC5_flag; int ERROR; int FLAG; int biphase_bit; this is the biphase bit decoder
Ticker clock1; 444us Ticker clock2; 889us
void rc5dat() {
here we disable the interuppt so we can process the bit stream void disable_irq(); FLAG = TRUE; }
<< /code>>
rc5dat is called from an interrupt in main() like this
<<code
int main(){
Serial pc(USBTX, USBRX); for debuging only FLAG = FALSE;
/* first we set up the port lines we are going to use */ /* the RC5 decoder is triggered on the rising edge of rc5int */ /* and the data is read in on rcdat */ InterruptIn rc5int(p21); this triggers the RC5 decoder DigitalIn rc5dat(p22); this is where the data is read from
rc5int.rise(&rc5dat); trigger int on rising edge - go service it at rc5dat main loop do {
if (FLAG == TRUE) { save_stream(); void enable_irq(); } while(1);
}
}
<< /code>>
Thank you
Please enclose code fragments between
posted by Paul Griffith 18 Apr 2015<<code>> and <</code>>
(hint: <<code doesn't work!).I assume you mean compiler error 40? If so, please copy the error message you get.
posted by Erik - 18 Apr 2015