]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commit - hw/sainsmart-dds120/fw.c
scopes: improve C preprocessor macro robustness
authorGerhard Sittig <redacted>
Mon, 18 Dec 2017 13:50:06 +0000 (14:50 +0100)
committerUwe Hermann <redacted>
Thu, 21 Dec 2017 15:13:49 +0000 (16:13 +0100)
commitfdaf46b9ac162543b9b23e5a0cf95127d6ea49cc
tree700a0fcc47a6b0e17d05f0bcb54a66ec6501c817
parentba63ce8b9aba391c41cde4605ef9b941d4a879b3
scopes: improve C preprocessor macro robustness

For pin and LED control related #define directives use C language
compound statements. This lets call sites use the macros in intended
ways (like regular function calls) without needing to worry about their
implementation details, or suffering from unexpected behaviour.

Strictly speaking the single statement variants don't require the
wrapper, but I've added one for improved future maintenance.
hw/hantek-6022be/fw.c
hw/hantek-6022bl/fw.c
hw/sainsmart-dds120/fw.c