[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/diku/mcs51/apps/Blink
Blink.nc, NONE, 1.1 BlinkM.nc, NONE, 1.1 Makefile, NONE, 1.1
Martin Leopold
mleopold at users.sourceforge.net
Fri Apr 7 05:49:57 PDT 2006
Update of /cvsroot/tinyos/tinyos-1.x/contrib/diku/mcs51/apps/Blink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20038/apps/Blink
Added Files:
Blink.nc BlinkM.nc Makefile
Log Message:
A first go at an mcs51 port
--- NEW FILE: Blink.nc ---
/*
*/
configuration Blink {
}
implementation {
components Main, BlinkM, LedsC;
Main.StdControl -> BlinkM.StdControl;
BlinkM.Leds -> LedsC;
}
--- NEW FILE: BlinkM.nc ---
/*
The Blink application
Toggles the three LEDs and show counter on P0.0 - P0.3
*/
module BlinkM {
provides {
interface StdControl;
}
uses {
interface Leds;
}
}
implementation {
command result_t StdControl.init() {
call Leds.init();
return SUCCESS;
}
command result_t StdControl.start() {
long int x, y=0;
while(1) {
call Leds.redToggle();
call Leds.greenToggle();
call Leds.yellowToggle();
for (x=0; x<25000; x++);
atomic {
P0&=240;
P0|=y++;
}
if(y>15) y=0;
}
return SUCCESS;
}
command result_t StdControl.stop() {
return SUCCESS;
}
}
--- NEW FILE: Makefile ---
COMPONENT=Blink
PFLAGS=-I%T/lib/Counters
ifdef IM_SENDER
PFLAGS += "-DIM_SENDER"
endif
include ../Makerules
More information about the Tinyos-contrib-commits
mailing list