AnsweredAssumed Answered

Reversing endianess

Question asked by T J on Jun 3, 2018
Latest reply on Jun 3, 2018 by T J

4.4.4 REV, REVH, and REVSH
REV reverses the byte order in a data word,

For example, if R0 is 0x12345678, in executing the following:
REV R1, R0
R1 will become 0x78563412,

The Definitive Guide to the ARM® Cortex-M3 by Joseph Yiu



in a C file

Would call this assembler instruction in a function ?


or define it as a macro ?


or inline assembler ?