diff --git a/hardware/fx2lafw/command.c b/hardware/fx2lafw/command.c index 7053ce42..9bd634b5 100644 --- a/hardware/fx2lafw/command.c +++ b/hardware/fx2lafw/command.c @@ -59,16 +59,15 @@ SR_PRIV int command_get_revid_version(libusb_device_handle *devhdl, } SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl, - uint64_t samplerate, - bool samplewide) + uint64_t samplerate, gboolean samplewide) { struct cmd_start_acquisition cmd; int delay = 0, ret; /* Compute the sample rate. */ - if(samplewide && samplerate > MAX_16BIT_SAMPLE_RATE) { + if (samplewide && samplerate > MAX_16BIT_SAMPLE_RATE) { sr_err("fx2lafw: Unable to sample at %" PRIu64 "Hz " - "when collecting 16-bit samples.", samplerate); + "when collecting 16-bit samples.", samplerate); return SR_ERR; } diff --git a/hardware/fx2lafw/command.h b/hardware/fx2lafw/command.h index 682ccbaf..37f965cc 100644 --- a/hardware/fx2lafw/command.h +++ b/hardware/fx2lafw/command.h @@ -20,8 +20,7 @@ #ifndef LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H #define LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H -#include - +#include #include "sigrok.h" /* Protocol commands */ @@ -58,7 +57,6 @@ SR_PRIV int command_get_fw_version(libusb_device_handle *devhdl, SR_PRIV int command_get_revid_version(libusb_device_handle *devhdl, uint8_t *revid); SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl, - uint64_t samplerate, - bool samplewide); + uint64_t samplerate, gboolean samplewide); #endif diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 2c0c6360..aa8331f1 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -328,7 +328,7 @@ static int configure_probes(struct context *ctx, GSList *probes) continue; if (probe->index > 8) - ctx->sample_wide = true; + ctx->sample_wide = TRUE; probe_bit = 1 << (probe->index - 1); if (!(probe->trigger)) @@ -794,7 +794,7 @@ static void receive_transfer(struct libusb_transfer *transfer) if (ctx->trigger_stage == TRIGGER_FIRED) { /* Send the incoming transfer to the session bus. */ - const trigger_offset_bytes = trigger_offset * sample_width; + const int trigger_offset_bytes = trigger_offset * sample_width; packet.type = SR_DF_LOGIC; packet.payload = &logic; logic.length = transfer->actual_length - trigger_offset_bytes; diff --git a/hardware/fx2lafw/fx2lafw.h b/hardware/fx2lafw/fx2lafw.h index c8a1d929..c6ad3ce1 100644 --- a/hardware/fx2lafw/fx2lafw.h +++ b/hardware/fx2lafw/fx2lafw.h @@ -19,7 +19,6 @@ */ #include -#include #ifndef LIBSIGROK_HARDWARE_FX2LAFW_FX2LAFW_H #define LIBSIGROK_HARDWARE_FX2LAFW_FX2LAFW_H @@ -76,7 +75,7 @@ struct context { uint64_t cur_samplerate; uint64_t limit_samples; - bool sample_wide; + gboolean sample_wide; uint16_t trigger_mask[NUM_TRIGGER_STAGES]; uint16_t trigger_value[NUM_TRIGGER_STAGES];