diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c index f962729dc6..d07e48627a 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c +++ b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c @@ -356,7 +356,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); } diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c index f962729dc6..d07e48627a 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c @@ -356,7 +356,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); } diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c index f962729dc6..d07e48627a 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c +++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c @@ -356,7 +356,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); } diff --git a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c index 2100eb21f0..2fb7c1b8e9 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c +++ b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c @@ -352,7 +352,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); } diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 639e6c7c2d..e6b279ed42 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -74,6 +74,7 @@ * - Fixed incorrect signature in the CDC and DFU class bootloaders for the ATMEGA8U2 * - Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed * - Fixed compile errors in the incomplete BluetoothHost demo application (thanks to Timo Lindfors) + * - Fixed incorrect Dataflash buffer use in the DataflashManager_WriteBlocks_RAM() function of several demos/projects (thanks to Jeremy Willden) * * \section Sec_ChangeLog110528 Version 110528 * New: diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c index af3c0292ed..e13d63258e 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c @@ -357,7 +357,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); } diff --git a/Projects/TempDataLogger/Lib/DataflashManager.c b/Projects/TempDataLogger/Lib/DataflashManager.c index efd70012c1..b7d05980e6 100644 --- a/Projects/TempDataLogger/Lib/DataflashManager.c +++ b/Projects/TempDataLogger/Lib/DataflashManager.c @@ -356,7 +356,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); } diff --git a/Projects/Webserver/Lib/DataflashManager.c b/Projects/Webserver/Lib/DataflashManager.c index efd70012c1..b7d05980e6 100644 --- a/Projects/Webserver/Lib/DataflashManager.c +++ b/Projects/Webserver/Lib/DataflashManager.c @@ -356,7 +356,7 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, /* Send the Dataflash buffer write command */ Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_BUFF1WRITE); + Dataflash_SendByte(UsingSecondBuffer ? DF_CMD_BUFF2WRITE : DF_CMD_BUFF1WRITE); Dataflash_SendAddressBytes(0, 0); }