sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning.
This commit is contained in:
parent
af36b80969
commit
0a88ec3d9c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
#ifndef LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H
|
||||
#define LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <glib.h>
|
||||
#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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#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];
|
||||
|
|
Loading…
Reference in New Issue