Merge in latest trunk.
[pub/USBasp.git] / Demos / Device / ClassDriver / VirtualSerialMassStorage / Lib / DataflashManager.h
index dbcbb5d..e9e2ef9 100644 (file)
@@ -39,8 +39,9 @@
        /* Includes: */
                #include <avr/io.h>
 
-               #include "VirtualSerialMassStorage.h"
-               #include "Descriptors.h"
+               #include "../VirtualSerialMassStorage.h"
+               #include "../Descriptors.h"
+               #include "Config/AppConfig.h"
 
                #include <LUFA/Common/Common.h>
                #include <LUFA/Drivers/USB/USB.h>
@@ -65,6 +66,9 @@
                 */
                #define VIRTUAL_MEMORY_BLOCKS               (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
 
+               /** Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device. */
+               #define LUN_MEDIA_BLOCKS         (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
+
        /* Function Prototypes: */
                void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
                                                  const uint32_t BlockAddress,