Hi,

I am trying to configure the external interrupt INT2 for rising edge
triggered, but its not getting triggered. I am using the INT2 interface
provided by HplAtm128InterruptC. Below are the essential parts of my code.
I am not sure where I am doing it wrong. I am toggling the LED when the
interrupt is triggered,but there is no response at the LED. Am I doing it
wrong, or is this the correct way? Thanks in advance!

- Debasmit

*In the configuration file:*
.....
components HplAtm128InterruptC;
.....
App.ExtInt2 -> HplAtm128InterruptC.Int2;

*In the implementation file:
*module XXC {
    ....
 uses interface HplAtm128Interrupt as ExtInt2;
 }

implementation {
   ...
event void Boot.booted() {
...
atomic{
                        call ExtInt2.disable();
                        call ExtInt2.edge(TRUE);
                        call ExtInt2.clear();
                        call ExtInt2.enable();
           }
}

//ISR
async event void ExtInt2.fired() {
                atomic{
                        call ExtInt2.disable();
                        //handle interrupt
                        call Leds.led0Toggle();
                        call ExtInt2.enable();
                }
}



**
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to