
The conversion given assumed two things: 1. the pointer was either 32-bit aligned or that unaligned word access was safe. (Not the case on ARM) We avoid this by using memcpy to copy to a buffer that *is* 32-bit-word-aligned. 2. the word was in native-endian format. The original code appeared to assume the given word would be in big-endian format (aka "network" byte order), so we convert it to the host's native format before casting. We re-instate the original implementation, controlled by a compiler switch to allow easy rollback if problems are encountered.
libmbus: M-bus Library from Raditex Control (http://www.rscada.se) libmbus is an open source library for the M-bus (Meter-Bus) protocol. The Meter-Bus is a standard for reading out meter data from electricity meters, heat meters, gas meters, etc. The M-bus standard deals with both the electrical signals on the M-Bus, and the protocol and data format used in transmissions on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle the communication with M-Bus devices. For more information see http://www.rscada.se/libmbus
Description
Languages
C
95.8%
Shell
1.8%
Makefile
1.5%
XSLT
0.5%
M4
0.3%