If it's a compiler whine about the function prototype (arguments
and return value) then the header file is the thing you want...
memset() appears to be in <string.h>
Otherwise please send the actual error text or a more complete
description of the problem and code.
However the subject of the message appears to indicate something else...
There isn't really an alloc() in TOS (unless T2 is a vaster improvement
over T1 than I've been lead to believe...). You pretty much have to
statically allocate anything you need, or invent your own dynamic
allocation using a static block of memory. A static allocation for a
two dim byte array would look like this, where d1 and d2 are the
array sizes and "n" is it's name:
char n[d1][d2];
When you use it "n" will point to the beginning and sizeof(n) will
give you how many bytes (d1*d2). And I never remember which dimension
is which, but it probably doesn't matter if you're not paging memory.
That wikibook looks like a great resource. I'm going to keep a link
and post it to this list periodically...heh
MS
Ben Buckner wrote:
Hello all,
We are using mica2 and mts300 sensor boards and we have a problem using
functions like
memset and memcpy. We are using tinyos 2.x and we wanted to know is there
any way of doing that?Do we need to include a specific header file? Any
help will be much appreciated.
thanks in advance,
Itamar and Eran.
p.s : Is there any good programming environment for tinyos2.x? (like
eclipse or visual studio...)
If you use a library function, you need a header file. You can find an
on-line guide to C programming at
http://en.wikibooks.org/wiki/C_Programming.
Regards,
Ben B.
_______________________________________________
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