Make CPPCheck tool happy by altering the program flow in the low level keyboard examp...
[pub/USBasp.git] / Demos / Device / ClassDriver / MassStorageKeyboard / Lib / DataflashManager.h
index 6900b03..68356b2 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
        /* Includes: */
                #include <avr/io.h>
 
-               #include "MassStorageKeyboard.h"
-               #include "Descriptors.h"
-
+               #include "../MassStorageKeyboard.h"
+               #include "../Descriptors.h"
+               #include "Config/AppConfig.h"
+               
                #include <LUFA/Common/Common.h>
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/Dataflash.h>
@@ -63,6 +64,9 @@
                /** Total number of blocks of the virtual memory for reporting to the host as the device's total capacity. */
                #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,