Typecasting is for precision adjustment???
And how to include stdio.h... There's no stdio in motes.
Sorry, I don't have a clue what you're talking about.
Harri
________________________________
From: ram kishore [mailto:[EMAIL PROTECTED]
Sent: Friday, May 23, 2008 4:29 PM
To: [email protected]
Cc: Siirtola Harri
Subject: Re: [Tinyos-help] Finding 1's Complement
Oops,
that is not the purpose of typecasting.Typecasting is about
precision adjustment.
How to include #include stdio.h in my application?
still any ideas as to how to convert hex into decimal?
Thanks
On Fri, May 23, 2008 at 6:09 PM, Siirtola Harri <[EMAIL PROTECTED]>
wrote:
Huh? If you have it in a variable, just typecast it to int:
int IntVar;
IntVar = (int) YourXORedVar;
Harri
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ram
kishore
Sent: Friday, May 23, 2008 2:06 PM
To: [email protected]
Subject: Re: [Tinyos-help] Finding 1's Complement
Hi,
I added #include stdio.h as below to configuration file:
#include stdio.h
configuration TOSBase {
}
implementation {
components Main, TOSBaseM, RadioCRCPacket as Comm, FramerM,
UART, LedsC;........
//some lines
}
I get the following error:
TOSBase.nc:38:10: #include expects "FILENAME" or
<FILENAME>
<commandline>: failed to preprocess TOSBase.nc
Somehow, I got the one's compliment using XOR operator (as said
by Hunkeler).But how can i convert into integer?
Is there any pre-defind C function? Or I have to write program
for that conversion?
Many regards,
Kishore
On Thu, May 22, 2008 at 9:06 PM, Michael Schippling
<[EMAIL PROTECTED]> wrote:
ones-compliment is negation, c.f.:
http://www.cis.cau.edu/~mititi/cis472/Binnum/tsld005.htm
<http://www.cis.cau.edu/%7Emititi/cis472/Binnum/tsld005.htm>
I believe that you #include studio.h in exactly that
way,
however you may be disappointed as to how many of the
functions are supported under TOS.
MS
ram kishore wrote:
Hi,
I need to find 1's complement of the
incoming hex message.How to add #include<stdio.h> to my application?
Is there any alternative way of doing this?
Regards,
Kishore
------------------------------------------------------------------------
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help