John Regehr wrote:
>> #define DEFINE_UNION_CAST(func_name,to_type,from_type) \
>> to_type func_name(from_type x) @safe() { union {from_type f; to_type
>> t;} c = {f:x}; return c.t; }
>>
>> DEFINE_UNION_CAST(adc12ctl2int,uint16_t,adc12ctl0_t)
>>
>> async command adc12ctl0_t HplAdc12.getCtl0(){
>> return adc12ctl2int(ADC12CTL0);
>> }
>>
>
> This gives the desired asm with the latest version of mspgcc.
>
> John
>
Thank you all for your responses.
Rohit
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@...
https://lists.sourceforge.net/lists/listinfo/mspgcc-users