uses interface GeneralIO as CLOCK;
uses interface GpioInterrupt as InterruptDATA;
+ uses interface BusyWait<TMicro, uint8_t>;
uses interface Timer<TMilli>;
uses interface Leds;
call DATA.makeOutput();
call DATA.set();
call CLOCK.clr();
+ call BusyWait.wait(5);
call CLOCK.set();
+ call BusyWait.wait(5);
call DATA.clr();
+ call BusyWait.wait(5);
call CLOCK.clr();
+ call BusyWait.wait(5);
call CLOCK.set();
+ call BusyWait.wait(5);
call DATA.set();
+ call BusyWait.wait(5);
call CLOCK.clr();
}
call DATA.clr();
byte = byte << 1;
call CLOCK.set();
+ call BusyWait.wait(5);
call CLOCK.clr();
}
}
call DATA.makeOutput();
call DATA.clr();
call CLOCK.set();
+ call BusyWait.wait(5);
call CLOCK.clr();
call DATA.makeInput();
call DATA.set();
call DATA.makeOutput();
call DATA.set();
call CLOCK.set();
+ call BusyWait.wait(5);
call CLOCK.clr();
}