I think that "state" gets set to TRUE when you call txByte()
but is only reset in putDone(). So after the first non-put byte
the state is stuck in TRUE and txByte() always returns FAIL.

MS

Jeong Kwanhee wrote:
Hello all!!!

I’m trying to change the UART part.

Because I want to send only necessary information, so I changed below.

async command result_t ByteComm.txByte(uint8_t data) {

    bool oldState;

    dbg(DBG_UART, "UART_write_Byte_inlet %x\n", data);

    atomic {

      oldState = state;

      state = TRUE;

    }

    if (oldState)

      return FAIL;

    *_if(data == 0x7E)_*

    call HPLUART.put(data);

    return SUCCESS;

}

In other words, I need only packet’s number which is sended child.

However, when I changed this, this mote sent only 7E once. After this, No act any more.

Could you tell me why it is not correctly???


------------------------------------------------------------------------

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to