sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning.
This commit is contained in:
parent
af36b80969
commit
0a88ec3d9c
|
@ -59,8 +59,7 @@ SR_PRIV int command_get_revid_version(libusb_device_handle *devhdl,
|
||||||
}
|
}
|
||||||
|
|
||||||
SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl,
|
SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl,
|
||||||
uint64_t samplerate,
|
uint64_t samplerate, gboolean samplewide)
|
||||||
bool samplewide)
|
|
||||||
{
|
{
|
||||||
struct cmd_start_acquisition cmd;
|
struct cmd_start_acquisition cmd;
|
||||||
int delay = 0, ret;
|
int delay = 0, ret;
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
#ifndef LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H
|
#ifndef LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H
|
||||||
#define LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H
|
#define LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "sigrok.h"
|
#include "sigrok.h"
|
||||||
|
|
||||||
/* Protocol commands */
|
/* 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,
|
SR_PRIV int command_get_revid_version(libusb_device_handle *devhdl,
|
||||||
uint8_t *revid);
|
uint8_t *revid);
|
||||||
SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl,
|
SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl,
|
||||||
uint64_t samplerate,
|
uint64_t samplerate, gboolean samplewide);
|
||||||
bool samplewide);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -328,7 +328,7 @@ static int configure_probes(struct context *ctx, GSList *probes)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (probe->index > 8)
|
if (probe->index > 8)
|
||||||
ctx->sample_wide = true;
|
ctx->sample_wide = TRUE;
|
||||||
|
|
||||||
probe_bit = 1 << (probe->index - 1);
|
probe_bit = 1 << (probe->index - 1);
|
||||||
if (!(probe->trigger))
|
if (!(probe->trigger))
|
||||||
|
@ -794,7 +794,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
|
||||||
|
|
||||||
if (ctx->trigger_stage == TRIGGER_FIRED) {
|
if (ctx->trigger_stage == TRIGGER_FIRED) {
|
||||||
/* Send the incoming transfer to the session bus. */
|
/* 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.type = SR_DF_LOGIC;
|
||||||
packet.payload = &logic;
|
packet.payload = &logic;
|
||||||
logic.length = transfer->actual_length - trigger_offset_bytes;
|
logic.length = transfer->actual_length - trigger_offset_bytes;
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#ifndef LIBSIGROK_HARDWARE_FX2LAFW_FX2LAFW_H
|
#ifndef LIBSIGROK_HARDWARE_FX2LAFW_FX2LAFW_H
|
||||||
#define LIBSIGROK_HARDWARE_FX2LAFW_FX2LAFW_H
|
#define LIBSIGROK_HARDWARE_FX2LAFW_FX2LAFW_H
|
||||||
|
@ -76,7 +75,7 @@ struct context {
|
||||||
uint64_t cur_samplerate;
|
uint64_t cur_samplerate;
|
||||||
uint64_t limit_samples;
|
uint64_t limit_samples;
|
||||||
|
|
||||||
bool sample_wide;
|
gboolean sample_wide;
|
||||||
|
|
||||||
uint16_t trigger_mask[NUM_TRIGGER_STAGES];
|
uint16_t trigger_mask[NUM_TRIGGER_STAGES];
|
||||||
uint16_t trigger_value[NUM_TRIGGER_STAGES];
|
uint16_t trigger_value[NUM_TRIGGER_STAGES];
|
||||||
|
|
Loading…
Reference in New Issue