AnsweredAssumed Answered

change endian type FATFs

Question asked by khan.umair on Mar 26, 2015
Latest reply on Mar 26, 2015 by Clive One
i am a beginner in microcontroller coding i was playing with fatFS recently, i wrote a loop to continuously write 0x1234578    in hex form in file but from file i am geting output as
                     78 56 34 12 78 56 34 12
i know that this is because of endian mismatch and there is a statement

#define __REV                             __rev 

in file core_cmInstr.h but i didn't know how and where to use it directly to change endian type

i am writing data in a variable named as buffer before writing to file on card
following is the loop i use

for (kk = 0; kk < size; kk++ )
     buffer[kk] = 0x12345678;     

 should i use __rev  in loop ? when i try to use it by asm('__rev') keil returns error.. plz help