[Tinyos-help] Errors to pass from hex to dec
Urs Hunkeler
uhu at gmx.ch
Thu Jan 15 01:16:12 PST 2009
Hi Lorena,
I am not sure I understand your question. Why do you use asm?
How about:
temp5 = (temp1 << 24l) + (temp2 << 16l) + (temp3 << 8l) + temp4;
or
temp5 = 0xAABBCCDDl;
The 'l' (lower case 'L') tells the compiler to treat the literal as long
(32 bit integer).
Cheers,
Urs
Lorena Aguirre wrote:
> Hello,
>
> I have a sintax error when I try to do asm{temp5 =swap(temp5)}
>
> I have this:
>
> uint8_t temp1 = 0xAA;
> uint8_t temp2 = 0xBB;
> uint8_t temp3 = 0xCC;
> uint8_t temp4 = 0xDD;
>
> and I want to pass them to:
>
> uint32_t temp5;
>
> and than temp5 will be temp5=0xAABBCCDD;
>
> Could anyone help me please?
>
> Thank you!!!
> Lorena
More information about the Tinyos-help
mailing list