Date: | 2013-01-25 00:00:59 (11 years 2 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 4ce686676792a490f3f8d6fa24c43d9b9ef21ab4 |
Message: | ubb-la/ubb-la.c (do_buf): skip over the first 122 samples They are from the setup process and therefore invalid (DAT0) and/or out of sync (DAT0-3) with the rest of the samples. |
Files: |
ubb-la/ubb-la.c (2 diffs) |
Change Details
ubb-la/ubb-la.c | ||
---|---|---|
29 | 29 | |
30 | 30 | #define KEY_MASK 0x5fc0000 |
31 | 31 | |
32 | #define INITIAL_SKIP 122 /* should be 123 for higher speeds */ | |
33 | ||
32 | 34 | |
33 | 35 | /* ----- Enable/disable interrupts ----------------------------------------- */ |
34 | 36 | |
... | ... | |
181 | 183 | if (!xfer(vec.addr, nibbles, trigger, mask)) |
182 | 184 | return 0; |
183 | 185 | |
184 | for (i = 0; i != nibbles; i++) { | |
186 | for (i = INITIAL_SKIP; i != nibbles; i++) { | |
185 | 187 | v = (buf[i >> 1] >> (4*(~i & 1))) & 0xf; |
186 | 188 | if (v == last) { |
187 | 189 | count++; |
Branches:
master