int channelbit, trigger_set;
devc = sdi->priv;
- memset(&devc->trigger, 0, sizeof(struct sigma_trigger));
- if (!(trigger = sr_session_trigger_get(sdi->session)))
+ memset(&devc->trigger, 0, sizeof(devc->trigger));
+ trigger = sr_session_trigger_get(sdi->session);
+ if (!trigger)
return SR_OK;
trigger_set = 0;
uint32_t i;
uint32_t dl_lines_total, dl_lines_curr, dl_lines_done;
uint32_t dl_first_line, dl_line;
- uint32_t dl_events_in_line;
+ uint32_t dl_events_in_line, trigger_event;
uint32_t trg_line, trg_event;
int ret;
devc = sdi->priv;
- dl_events_in_line = EVENTS_PER_ROW;
sr_info("Downloading sample data.");
devc->state.state = SIGMA_DOWNLOAD;
}
for (i = 0; i < dl_lines_curr; i++) {
- uint32_t trigger_event = ~0;
/* The last "DRAM line" need not span its full length. */
+ dl_events_in_line = EVENTS_PER_ROW;
if (dl_lines_done + i == dl_lines_total - 1)
dl_events_in_line = stoppos & ROW_MASK;
/* Test if the trigger happened on this line. */
+ trigger_event = ~0;
if (dl_lines_done + i == trg_line)
trigger_event = trg_event;
int i, j;
int x[2][2], tmp, a, b, aset, bset, rset;
- memset(x, 0, 4 * sizeof(int));
+ memset(x, 0, sizeof(x));
/* Trigger detect condition. */
switch (oper) {
struct triggerlut *lut)
{
int i,j;
- uint16_t masks[2] = { 0, 0 };
+ uint16_t masks[2];
- memset(lut, 0, sizeof(struct triggerlut));
+ memset(lut, 0, sizeof(*lut));
+ memset(&masks, 0, sizeof(masks));
/* Constant for simple triggers. */
lut->m4 = 0xa000;