paparazzi / pprzlink

Message and communication library for the Paparazzi UAV system
Other
24 stars 55 forks source link

This solution should provide a solution for unaligned access #110

Closed gautierhattenberger closed 4 years ago

gautierhattenberger commented 4 years ago

So, this one seems to be good finally...

It should work for all architectures and all compilers, for values and arrays.

If unaligned access is supported, it has no overhead, otherwise proper assembly code (with underlying memcpy) is generated. The big endian swap is removed as it is not the proper way to do it anyway. If we actually need to support big endianness, it should be done properly and for all types bigger than a single byte.

Needed by https://github.com/paparazzi/paparazzi/pull/2512