Fixed incorrect Dataflash buffer use in the DataflashManager_WriteBlocks_RAM() functi...
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 30 Jul 2011 02:49:59 +0000 (02:49 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 30 Jul 2011 02:49:59 +0000 (02:49 +0000)
Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c
Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c
Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c
LUFA/ManPages/ChangeLog.txt
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c
Projects/TempDataLogger/Lib/DataflashManager.c
Projects/Webserver/Lib/DataflashManager.c

index f962729..d07e486 100644 (file)
@@ -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);
                        }
 
index f962729..d07e486 100644 (file)
@@ -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);
                        }
 
index f962729..d07e486 100644 (file)
@@ -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);
                        }
 
index 2100eb2..2fb7c1b 100644 (file)
@@ -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);
                        }
 
index 639e6c7..e6b279e 100644 (file)
@@ -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
   *  <b>New:</b>
index af3c029..e13d632 100644 (file)
@@ -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);
                        }
 
index efd7001..b7d0598 100644 (file)
@@ -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);
                        }
 
index efd7001..b7d0598 100644 (file)
@@ -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);
                        }