Sigma: Fix simple trigger LUT calculation.
This commit is contained in:
parent
ee492173a1
commit
f758d0744d
|
@ -932,21 +932,24 @@ static int build_basic_trigger(struct triggerlut *lut)
|
||||||
lut->m4 = 0xa000;
|
lut->m4 = 0xa000;
|
||||||
|
|
||||||
/* Set the LUT for controlling value/maske trigger */
|
/* Set the LUT for controlling value/maske trigger */
|
||||||
|
|
||||||
|
/* For each quad probe. */
|
||||||
for (i = 0; i < 4; ++i) {
|
for (i = 0; i < 4; ++i) {
|
||||||
lut->m2d[i] = 0xffff;
|
lut->m2d[i] = 0xffff;
|
||||||
|
|
||||||
|
/* For each bit in LUT. */
|
||||||
for (j = 0; j < 16; ++j)
|
for (j = 0; j < 16; ++j)
|
||||||
|
|
||||||
|
/* For each probe in quad. */
|
||||||
for (k = 0; k < 4; ++k) {
|
for (k = 0; k < 4; ++k) {
|
||||||
bit = 1 << (i * 4 + k);
|
bit = 1 << (i * 4 + k);
|
||||||
|
|
||||||
if ((triggermask & bit) &&
|
if ((triggermask & bit) &&
|
||||||
(triggervalue & bit) != (j & (1 << k))) {
|
((!(triggervalue & bit)) !=
|
||||||
|
(!(j & (1 << k)))))
|
||||||
lut->m2d[i] &= ~(1 << j);
|
lut->m2d[i] &= ~(1 << j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Unused when not triggering on transitions */
|
/* Unused when not triggering on transitions */
|
||||||
lut->m3 = 0xffff;
|
lut->m3 = 0xffff;
|
||||||
|
|
Loading…
Reference in New Issue