Download Documento PDF
Transcript
APP. B
COMUNICAZIONE SERIALE
}
async event void UartStream.sendDone(uint8_t *buf, uint16_t len,
error_t error)
{
if(!forwarding){
if(error == SUCCESS)
post sendDoneSuccessTask();
else
post sendDoneFailTask();
}else
call DelayTimer.startOneShot(DELAY_TIME);
}
async command msp430_uart_union_config_t* Msp430UartConfigure.getConfig()
{
return &msp430_uart_tmote_config;
}
async event void UartStream.receivedByte(uint8_t byte)
{
}
async event void UartStream.receiveDone(uint8_t* buf, uint16_t len,
error_t error)
{
if(!attendConnection)
post receiveDoneTask();
else
if(!forwarding)
post connectionDoneTask();
else
post forwardingDoneTask();
}
92