Yes.
It sounds like you are transmitting garbage after the first byte?
Your array is on the stack of c1, which becomes the stack of
some other function when c1 returns. All subsequent calls to
txByte() end up pointing into someone else's stack...at least
you aren't writing to it...heh.
just declare your array outside of c1()
MS
jose m wrote:
If I have uint8_t *gb_array and uint16_t gb_array_size
as globals declarations, and a command like this:
command void c1(){
uint8_t array[16];
...
gb_array = array;
gb_array_size = 16;
gb_array_size--;
call ByteComm.txByte(*gb_array);
}
async event result_t ByteComm.txByteReady(bool
success){
if (gb_array_size > 0){
gb_array++;
gb_array_size--;
ByteComm.txByte(*gb_array);
}
else
...
}
my question is: if c1 ends after call txByte, the
variable array in c1, will be deallocated from the
stack before de transmission ends?
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
_______________________________________________
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