Sigma: Fix simple trigger LUT calculation.

This commit is contained in:
Håvard Espeland 2010-05-02 12:59:33 +02:00
parent ee492173a1
commit f758d0744d
1 changed files with 6 additions and 3 deletions

View File

@ -932,22 +932,25 @@ static int build_basic_trigger(struct triggerlut *lut)
lut->m4 = 0xa000;
/* Set the LUT for controlling value/maske trigger */
/* For each quad probe. */
for (i = 0; i < 4; ++i) {
lut->m2d[i] = 0xffff;
/* For each bit in LUT. */
for (j = 0; j < 16; ++j)
/* For each probe in quad. */
for (k = 0; k < 4; ++k) {
bit = 1 << (i * 4 + k);
if ((triggermask & bit) &&
(triggervalue & bit) != (j & (1 << k))) {
((!(triggervalue & bit)) !=
(!(j & (1 << k)))))
lut->m2d[i] &= ~(1 << j);
}
}
}
/* Unused when not triggering on transitions */
lut->m3 = 0xffff;