Hi, I am a new learner of TinyOS, use crossbow's IRIS module.
My program is sample.I send data from my own board to IRIS using
UART0,when it received ,it send back to my board. When it running,I saw it have
got the data,but the data it send back was not right.I don't know why.
Below is my program.Thank you.
module UART0M
{
provides {
interface StdControl;
}
uses {
interface Timer;
interface Leds;
interface HPLUART;
}
}
implementation
{
command result_t StdControl.init()
{
call Leds.init();
return SUCCESS;
}
command result_t StdControl.start()
{
call StdControl.stop();
call Timer.start(TIMER_REPEAT,1000);
call HPLUART.init();
return SUCCESS;
}
command result_t StdControl.stop()
{
call Timer.stop();
call HPLUART.stop();
return SUCCESS;
}
//********************************************************************************
event result_t Timer.fired()
{
call Leds.redToggle();
return SUCCESS;
}
async event result_t HPLUART.get(uint8_t rdata)
{
call Leds.greenToggle();
call HPLUART.put(rdata);
return SUCCESS;
}
async event result_t HPLUART.putDone()
{
call Leds.yellowToggle();
return SUCCESS;
}
}
---------------------------------
Never miss a thing. Make Yahoo your homepage.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help