Quote:
|
Originally Posted by kc8nod
Hi Kevin,
I've got a question about EEPROM_Write().
Code:
unsigned char EEPROM_Write(unsigned int address, unsigned char data)
{
unsigned char return_value;
// return error flag if the queue is full
if(eeprom_queue_full == FALSE)
{
// 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;
// increment the queue byte count
eeprom_queue_count++;
The parameter address is an unsigned integer, but eeprom_queue_address is an array of unsigned chars. Aren't you chopping off two bits from the address? Or did you mean to define eeprom_queue_address as an unsigned int also?
|
Ugh, It may be a bug, but I won't have time to look at it until this evening.
-Kevin