AnsweredAssumed Answered

How to use __byteswap() function ?

Question asked by Amit Kumar on Sep 15, 2014
Latest reply on Sep 17, 2014 by EARL GOODRICH



I am using K60 with cw 10.6. I am writing some values to serial port in binary format , the sequence of the values are same but they are flipped i.e

i am printing

AB BC CD 00                    // 32 bit value

i am getting

00 CD BC AB         

This issue was due to the little endian nature of uc so i wanted to swap the 32 bit data and then print it. I am unable to find any syntax for __byteswap32();


Kind Regards

Amit Kumar