Quote:
|
Originally Posted by sciguy125
I'm not sure, but I don't like that while
Code:
// wait, if necessary, for a free slot on the circular queue
while(EEPROM_Queue_Free_Space() == 0);
Won't that keep looping until the queue is full (which it never will be if it never leaves that loop)?
|
Yep, it's the while loop. I'm trying to write ninety-one bytes, but the queue only has sixteen slots. The code sits in the for loop and eventually EEPROM_Queue_Free_Space() returns zero forever because EEPROM_Write_Handler() isn't getting called to do the actual EEPROM write. The only way the code would work is if he queue size were changed to ninety-one slots. The trig table code seems like something that teams could use, so I'm writing a version that'll generate sin()/cos() and tan() tables in EEPROM. I'll also write the code to do the table lookup.
-Kevin