siglent-sds: Consistently use gboolean/TRUE/FALSE.

This commit is contained in:
Uwe Hermann 2018-10-15 00:04:21 +02:00
parent fa3d104f17
commit 827139ef49
3 changed files with 30 additions and 31 deletions

View File

@ -201,32 +201,32 @@ static const struct siglent_sds_series supported_series[] = {
#define SERIES(x) &supported_series[x]
/* series, model, min timebase, analog channels, digital */
static const struct siglent_sds_model supported_models[] = {
{ SERIES(SDS1000CML), "SDS1152CML", { 20, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000CML), "SDS1102CML", { 10, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000CML), "SDS1072CML", { 5, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000CNL), "SDS1202CNL", { 20, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000CNL), "SDS1102CNL", { 10, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000CNL), "SDS1072CNL", { 5, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000DL), "SDS1202DL", { 20, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000DL), "SDS1102DL", { 10, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000DL), "SDS1022DL", { 5, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000DL), "SDS1052DL", { 5, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000DL), "SDS1052DL+", { 5, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000X), "SDS1102X", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000XP), "SDS1102X+", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000X), "SDS1202X", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000XP), "SDS1202X+", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000XE), "SDS1202X-E", { 1, 1000000000 }, 2, false, 0 },
{ SERIES(SDS1000XE), "SDS1104X-E", { 1, 1000000000 }, 4, true, 16 },
{ SERIES(SDS1000XE), "SDS1204X-E", { 1, 1000000000 }, 4, true, 16 },
{ SERIES(SDS2000X), "SDS2072X", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS2000X), "SDS2074X", { 2, 1000000000 }, 4, false, 0 },
{ SERIES(SDS2000X), "SDS2102X", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS2000X), "SDS2104X", { 2, 1000000000 }, 4, false, 0 },
{ SERIES(SDS2000X), "SDS2202X", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS2000X), "SDS2204X", { 2, 1000000000 }, 4, false, 0 },
{ SERIES(SDS2000X), "SDS2302X", { 2, 1000000000 }, 2, false, 0 },
{ SERIES(SDS2000X), "SDS2304X", { 2, 1000000000 }, 4, false, 0 },
{ SERIES(SDS1000CML), "SDS1152CML", { 20, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000CML), "SDS1102CML", { 10, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000CML), "SDS1072CML", { 5, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000CNL), "SDS1202CNL", { 20, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000CNL), "SDS1102CNL", { 10, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000CNL), "SDS1072CNL", { 5, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000DL), "SDS1202DL", { 20, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000DL), "SDS1102DL", { 10, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000DL), "SDS1022DL", { 5, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000DL), "SDS1052DL", { 5, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000DL), "SDS1052DL+", { 5, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000X), "SDS1102X", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000XP), "SDS1102X+", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000X), "SDS1202X", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000XP), "SDS1202X+", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000XE), "SDS1202X-E", { 1, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS1000XE), "SDS1104X-E", { 1, 1000000000 }, 4, TRUE, 16 },
{ SERIES(SDS1000XE), "SDS1204X-E", { 1, 1000000000 }, 4, TRUE, 16 },
{ SERIES(SDS2000X), "SDS2072X", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2074X", { 2, 1000000000 }, 4, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2102X", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2104X", { 2, 1000000000 }, 4, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2202X", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2204X", { 2, 1000000000 }, 4, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2302X", { 2, 1000000000 }, 2, FALSE, 0 },
{ SERIES(SDS2000X), "SDS2304X", { 2, 1000000000 }, 4, FALSE, 0 },
};
SR_PRIV struct sr_dev_driver siglent_sds_driver_info;

View File

@ -467,7 +467,7 @@ SR_PRIV int siglent_sds_receive(int fd, int revents, void *cb_data)
struct sr_channel *ch;
int len, i;
float wait;
gboolean read_complete = false;
gboolean read_complete = FALSE;
(void)fd;
@ -556,7 +556,7 @@ SR_PRIV int siglent_sds_receive(int fd, int revents, void *cb_data)
}
do {
read_complete = false;
read_complete = FALSE;
if (devc->num_block_bytes > devc->num_samples) {
/* We received all data as one block. */
/* Offset the data block buffer past the IEEE header and description header. */
@ -612,7 +612,7 @@ SR_PRIV int siglent_sds_receive(int fd, int revents, void *cb_data)
sr_dbg("Transfer has been completed.");
devc->num_header_bytes = 0;
devc->num_block_bytes = 0;
read_complete = true;
read_complete = TRUE;
if (!sr_scpi_read_complete(scpi)) {
sr_err("Read should have been completed.");
packet.type = SR_DF_FRAME_END;

View File

@ -20,7 +20,6 @@
#ifndef LIBSIGROK_HARDWARE_SIGLENT_SDS_PROTOCOL_H
#define LIBSIGROK_HARDWARE_SIGLENT_SDS_PROTOCOL_H
#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
#include <libsigrok/libsigrok.h>
@ -78,7 +77,7 @@ struct siglent_sds_model {
const char *name;
uint64_t min_timebase[2];
unsigned int analog_channels;
bool has_digital;
gboolean has_digital;
unsigned int digital_channels;
};