/* Register SIGMA device. */
sdi = sigrok_device_instance_new(0, ST_INITIALIZING,
/* Register SIGMA device. */
sdi = sigrok_device_instance_new(0, ST_INITIALIZING,
} else if (capability == HWCAP_PROBECONFIG) {
ret = configure_probes(sdi, value);
} else if (capability == HWCAP_LIMIT_MSEC) {
} else if (capability == HWCAP_PROBECONFIG) {
ret = configure_probes(sdi, value);
} else if (capability == HWCAP_LIMIT_MSEC) {
- packet.type = DF_TRIGGER;
- packet.length = 0;
- packet.payload = 0;
- session_bus(sigma->session_id, &packet);
+ /* Only send trigger if explicitly enabled. */
+ if (sigma->use_triggers) {
+ packet.type = DF_TRIGGER;
+ packet.length = 0;
+ packet.payload = 0;
+ session_bus(sigma->session_id, &packet);
+ }
- packet.type = DF_LOGIC;
- packet.length = tosend * sizeof(uint16_t);
- packet.unitsize = 2;
- packet.payload = samples + sent;
- session_bus(sigma->session_id, &packet);
+ if (tosend > 0) {
+ packet.type = DF_LOGIC;
+ packet.length = tosend * sizeof(uint16_t);
+ packet.unitsize = 2;
+ packet.payload = samples + sent;
+ session_bus(sigma->session_id, &packet);
+ }
const int chunks_per_read = 32;
unsigned char buf[chunks_per_read * CHUNK_SIZE];
int bufsz, numchunks, i, newchunks;
const int chunks_per_read = 32;
unsigned char buf[chunks_per_read * CHUNK_SIZE];
int bufsz, numchunks, i, newchunks;
/* Enter trigger programming mode. */
sigma_set_register(WRITE_TRIGGER_SELECT1, 0x20, sigma);
/* Enter trigger programming mode. */
sigma_set_register(WRITE_TRIGGER_SELECT1, 0x20, sigma);