]> sigrok.org Git - libsigrok.git/commit
hantek-4032l: Fix structure packing.
authorAndrej Valek <redacted>
Mon, 2 Apr 2018 18:01:19 +0000 (20:01 +0200)
committerUwe Hermann <redacted>
Sun, 22 Apr 2018 09:11:06 +0000 (11:11 +0200)
commite80e1858efa09c4bd3164c2130e4c26bea4cbbd6
tree8e1be52afb84d189c32da65a85b17790ac369c4d
parent972001561b150ce91e206fc8e03daed13efcbc0d
hantek-4032l: Fix structure packing.

- use pragma to handle different behavior between gcc and minGW bit-field packing
- bit-field integer variables needs to be align to 2-byte boundary
Compiler does not produce an error when accessing into non-__packed pointer.
However, the field might not be properly aligned for this type.
More information could be found on:
 - https://sourceforge.net/p/mingw-w64/bugs/275/
 - http://www.keil.com/support/man/docs/ARMCC/armcc_chr1359124990875.htm

Signed-off-by: Andrej Valek <redacted>
src/hardware/hantek-4032l/protocol.c
src/hardware/hantek-4032l/protocol.h