aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders
diff options
context:
space:
mode:
authorEric Tang <e_l_tang@outlook.com>2016-04-19 22:28:40 -0700
committerEric Tang <e_l_tang@outlook.com>2016-04-19 22:28:40 -0700
commit738ded0f028d0a91e15732248ac5d7b45ec86288 (patch)
treefc1cfd75789e55cb1b89f171b742e8d3ff5cccd5 /Bootloaders
parent7e97be22a37017aa3df9ae73b92ae6043df4e9dd (diff)
downloadlufa-738ded0f028d0a91e15732248ac5d7b45ec86288.tar.gz
lufa-738ded0f028d0a91e15732248ac5d7b45ec86288.tar.bz2
lufa-738ded0f028d0a91e15732248ac5d7b45ec86288.zip
Update functions used to write to EEPROM
Diffstat (limited to 'Bootloaders')
-rw-r--r--Bootloaders/CDC/BootloaderCDC.c5
-rw-r--r--Bootloaders/DFU/BootloaderDFU.c3
2 files changed, 3 insertions, 5 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();
}
-
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c
index 71db9802a..d43c68652 100644
--- a/Bootloaders/DFU/BootloaderDFU.c
+++ b/Bootloaders/DFU/BootloaderDFU.c
@@ -400,7 +400,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++;
@@ -857,4 +857,3 @@ static void ProcessReadCommand(void)
DFU_Status = errADDRESS;
}
}
-