Hi Kevin,
Thanks for all the effort, it looks great and we'll definately be using it. I'd like to make one suggestion though.
With so many novice progammers using your code, it's likely that someone will use the EEPROM_Write() function too much, even when the data doesn't need to be updated. A small change to EEPROM_Write() might avoid problems for these folks.
Code:
unsigned char EEPROM_Write(unsigned int address, unsigned char data)
{
unsigned char return_value;
// determine if this is really new data
if(data == EEPROM_Read(address))
{
return_value = 1;
}
else if(eeprom_queue_full == FALSE) // return error flag if the queue is full
{
// put the byte and its address on their respective circular queues
eeprom_queue_data[eeprom_queue_write_index] = data;
eeprom_queue_address[eeprom_queue_write_index] = address;
If the new data being written, is the same as the old data that's already there, then we never add it to the queue.
Thanks again for all the hard work.