Dear all I want to test the interrupt of the MicaZ. I prepared a code for this purpose. but unfortunately MicaZ does not repose to this code properly. could you please help me to solve this issue? the code is as follows:
TestNodeC.nc ================================== module TestNodeC { uses interface Boot; uses interface Leds; uses interface HplAtm128Interrupt as Interrupt; uses interface HplAtm128Interrupt as Interrupt1; uses interface HplAtm128Interrupt as Interrupt2; uses interface GeneralIO as IO; } implementation { event void Boot.booted() { call Interrupt1.disable(); call Interrupt.clear(); call Interrupt.edge(TRUE); call Interrupt.enable(); call IO.makeInput(); call IO.set(); call Interrupt1.disable(); call Interrupt1.clear(); call Interrupt1.edge(TRUE); call Interrupt1.enable(); call Leds.led0On(); call Interrupt2.disable(); call Interrupt2.clear(); call Interrupt2.edge(TRUE); call Interrupt2.enable(); } async event void Interrupt.fired(){ call Leds.led2Toggle(); return; } async event void Interrupt2.fired(){ call Leds.led1Toggle(); return; } async event void Interrupt1.fired(){ call Leds.led2Toggle(); return; } } TestAppNodeC.nc ================================== configuration TestAppNodeC {} implementation { components TestNodeC, MainC, LedsC; components HplAtm128InterruptC; components HplAtm128GeneralIOC; //iris doesn't have GpioInterruptC TestNodeC.Boot -> MainC; TestNodeC.Leds -> LedsC; TestNodeC.Interrupt -> HplAtm128InterruptC.Int0; TestNodeC.Interrupt1 -> HplAtm128InterruptC.Int1; TestNodeC.Interrupt2 -> HplAtm128InterruptC.Int2; TestNodeC.IO -> HplAtm128GeneralIOC.PortE0; } makefile ================================== COMPONENT=TestAppNodeC include $(MAKERULES) Best regards SB
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help