Semantically this is correct...

This commit is contained in:
XANTRONIX Development 2016-05-29 16:32:45 -05:00
parent 0086384850
commit ffa6882870

View file

@ -50,10 +50,6 @@ ISR(TIMER0_COMPB_vect) {
if (buffer.cur < buffer.read) { if (buffer.cur < buffer.read) {
value_out = buffer.data[buffer.cur++]; value_out = buffer.data[buffer.cur++];
} else if (buffer.cur == buffer.len) {
buffer.len = 0;
buffer.cur = 0;
buffer.read = 0;
} }
bits = 8; bits = 8;
@ -74,10 +70,6 @@ ISR(SPI_STC_vect) {
if (buffer.cur < buffer.read) { if (buffer.cur < buffer.read) {
SPDR = buffer.data[buffer.cur++]; SPDR = buffer.data[buffer.cur++];
} else if (buffer.cur == buffer.len) {
buffer.len = 0;
buffer.cur = 0;
buffer.read = 0;
} }
} }
@ -150,10 +142,6 @@ static void setup_clock_external() {
* Initialize the SPI Data Register and serial buffer * Initialize the SPI Data Register and serial buffer
*/ */
SPDR = 0; SPDR = 0;
buffer.len = 0;
buffer.cur = 0;
buffer.read = 0;
} }
int main() { int main() {