Tue, 10 Dec 2019 15:51:32 +0000change hton() and ntoh() so we don't use (u8 *) to (u16 *) casts. Some compilers incorrectly change the pointer to force alignment with even addresses.
Mario de Sousa <msousa@fe.up.pt> [Tue, 10 Dec 2019 15:51:32 +0000] rev 6
change hton() and ntoh() so we don't use (u8 *) to (u16 *) casts. Some compilers incorrectly change the pointer to force alignment with even addresses.

Tue, 10 Dec 2019 09:30:59 +0100Mario's fix for the pointer alignment problem. See changeset 4: 99009b24d401.
bmakuc <blaz.makuc@smarteh.si> [Tue, 10 Dec 2019 09:30:59 +0100] rev 5
Mario's fix for the pointer alignment problem. See changeset 4: 99009b24d401.

Wed, 27 Nov 2019 14:53:22 +0100Variables start_addr and count were read from query_packet using function mb_ntoh_safe. It looks like some compilers change the pointer alignment if the first byte starts at an odd address. Because mb_ntoh_safe uses pointers slave address and count (number of registers) were not read correctly from the buffer when several modbus slaves were present in network. In this temporary solution pointer aritmetics is replaced by simple 256 multiplication.
bmakuc <blaz.makuc@smarteh.si> [Wed, 27 Nov 2019 14:53:22 +0100] rev 4
Variables start_addr and count were read from query_packet using function mb_ntoh_safe. It looks like some compilers change the pointer alignment if the first byte starts at an odd address. Because mb_ntoh_safe uses pointers slave address and count (number of registers) were not read correctly from the buffer when several modbus slaves were present in network. In this temporary solution pointer aritmetics is replaced by simple 256 multiplication.