mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-04 22:53:08 +02:00
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.
This commit is contained in:
parent
fc4b8e720a
commit
4ce6866767
@ -29,6 +29,8 @@
|
||||
|
||||
#define KEY_MASK 0x5fc0000
|
||||
|
||||
#define INITIAL_SKIP 122 /* should be 123 for higher speeds */
|
||||
|
||||
|
||||
/* ----- Enable/disable interrupts ----------------------------------------- */
|
||||
|
||||
@ -181,7 +183,7 @@ static int do_buf(int nibbles, uint32_t trigger, uint32_t mask)
|
||||
if (!xfer(vec.addr, nibbles, trigger, mask))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i != nibbles; i++) {
|
||||
for (i = INITIAL_SKIP; i != nibbles; i++) {
|
||||
v = (buf[i >> 1] >> (4*(~i & 1))) & 0xf;
|
||||
if (v == last) {
|
||||
count++;
|
||||
|
Loading…
Reference in New Issue
Block a user