Hi,
How can I change a little-endian data to big-endian using mbed,so that I can transfer it to the network by the corrent format?
BR
tg
With GCC I tend to use the __builtin_bswap
functions, ctrl-f for “bswap” on this page. If you include the LwIP headers that also provides htons and htonl functions.