Commit 0ad009fa authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw/fw: fix bug that caused ADC external triggers to be ignored

parent df6f2d76
......@@ -77,8 +77,15 @@ static void adcin_input(struct wrtd_adcin_dev *adcin)
ev.ts.frac = 0;
for (i = 0; i < ADCIN_NUM_CHANNELS; i++) {
if (!(mask & ((ALT_TRIGOUT_CH1_MASK >> 32) << i)))
continue;
/* The last channel is the ext trigger with a different mask */
if ( i == ADCIN_NUM_CHANNELS - 1 ) {
if (!(mask & (ALT_TRIGOUT_EXT_MASK >> 32)))
continue;
}
else if (!(mask & ((ALT_TRIGOUT_CH1_MASK >> 32) << i)))
continue;
memset(ev.id, 0, WRTD_ID_LEN);
ev.id[0] = 'A';
ev.id[1] = 'D';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment