1
0
Fork 0

Update functions used to write to EEPROM

This commit is contained in:
Eric Tang 2016-04-21 19:35:18 -07:00
parent 9828aba2a1
commit 620ac4b260
14 changed files with 52 additions and 52 deletions

View file

@ -327,7 +327,7 @@ static void ReadWriteMemoryBlock(const uint8_t Command)
else
{
/* Write the next EEPROM byte from the endpoint */
eeprom_write_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
eeprom_update_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
/* Increment the address counter after use */
CurrAddress += 2;
@ -581,7 +581,7 @@ static void CDC_Task(void)
else if (Command == AVR109_COMMAND_WriteEEPROM)
{
/* Read the byte from the endpoint and write it to the EEPROM */
eeprom_write_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
eeprom_update_byte((uint8_t*)((intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
/* Increment the address after use */
CurrAddress += 2;

View file

@ -370,7 +370,7 @@ void EVENT_USB_Device_ControlRequest(void)
}
/* Read the byte from the USB interface and write to to the EEPROM */
eeprom_write_byte((uint8_t*)StartAddr, Endpoint_Read_8());
eeprom_update_byte((uint8_t*)StartAddr, Endpoint_Read_8());
/* Adjust counters */
StartAddr++;