Reading the delay out of the 5 most significant bits from the framedata variable frame.
This commit is contained in:
parent
53040bd56c
commit
f68c38b625
1 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,11 @@ ISR (TIMER1_COMPA_vect)
|
||||||
frmnum++;
|
frmnum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delay = (frame & 0xf8000000) >> 24; // Just shift right by 24 instead of 27 to multiply the delay by 8.
|
// Just shift right by 24 instead of 27 to multiply the delay by 8.
|
||||||
|
// Possible delays are 8 16 24 32 and so on. A zero delay isn't possible.
|
||||||
|
// Zero means that a delay of 255 happens because the delay variable was decreased first before testing
|
||||||
|
// it's is zero value.
|
||||||
|
delay = (frame & 0xf8000000) >> 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PORTD = __, 9, C, B, A,D+,D-,__
|
// PORTD = __, 9, C, B, A,D+,D-,__
|
||||||
|
|
Loading…
Reference in a new issue