Hi, i am trying to compile code that used to run fine with an older version of the mbed libraries, but now it seems to get stuck in a loop when attaching a serial interrupt.
here is my code:
- include "mbed.h"
DigitalOut myled(LED1);
Serial wifly(p13,p14);
Serial pc(USBTX,USBRX);
void pcrxcallback(){
wifly.putc(pc.getc());
}
void wiflyrxcallback(void){
pc.putc(wifly.getc());
}
int main(void){
pc.baud(9600);
pc.attach(&pcrxcallback, RxIrq);
wifly.baud(9600);
wifly.attach(&wiflyrxcallback, RxIrq);
do{
myled = 1;
wait(0.2);
myled = 0;
wait(0.2);
}
while(1);
}
as far as i can tell, it gets stuck when attaching the wifly rx interrupt.
Is there a bug in the new library? or am i doing something wrong?
Thanks
Hi, i am trying to compile code that used to run fine with an older version of the mbed libraries, but now it seems to get stuck in a loop when attaching a serial interrupt.
here is my code:
DigitalOut myled(LED1); Serial wifly(p13,p14); Serial pc(USBTX,USBRX);
void pcrxcallback(){ wifly.putc(pc.getc()); }
void wiflyrxcallback(void){ pc.putc(wifly.getc()); }
int main(void){ pc.baud(9600); pc.attach(&pcrxcallback, RxIrq);
wifly.baud(9600); wifly.attach(&wiflyrxcallback, RxIrq);
do{ myled = 1; wait(0.2); myled = 0; wait(0.2);
} while(1); }
as far as i can tell, it gets stuck when attaching the wifly rx interrupt. Is there a bug in the new library? or am i doing something wrong?
Thanks