aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/CDC/BootloaderCDC.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2016-04-20 19:33:20 +1000
committerDean Camera <dean@fourwalledcubicle.com>2016-04-20 19:33:20 +1000
commitfe1c241ff7412c3e461b15592ac2a5cdae97a5eb (patch)
treefc1cfd75789e55cb1b89f171b742e8d3ff5cccd5 /Bootloaders/CDC/BootloaderCDC.c
parent7e97be22a37017aa3df9ae73b92ae6043df4e9dd (diff)
parent738ded0f028d0a91e15732248ac5d7b45ec86288 (diff)
downloadlufa-fe1c241ff7412c3e461b15592ac2a5cdae97a5eb.tar.gz
lufa-fe1c241ff7412c3e461b15592ac2a5cdae97a5eb.tar.bz2
lufa-fe1c241ff7412c3e461b15592ac2a5cdae97a5eb.zip
Merge pull request #84 from eltang/eeprom_wear_fix
Update functions used to write to EEPROM (thanks to Eric Tang).
Diffstat (limited to 'Bootloaders/CDC/BootloaderCDC.c')
-rw-r--r--Bootloaders/CDC/BootloaderCDC.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c
index 703dbcba9..625a99685 100644
--- a/Bootloaders/CDC/BootloaderCDC.c
+++ b/Bootloaders/CDC/BootloaderCDC.c
@@ -360,7 +360,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;
@@ -614,7 +614,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;
@@ -671,4 +671,3 @@ static void CDC_Task(void)
/* Acknowledge the command from the host */
Endpoint_ClearOUT();
}
-