Change over all makefiles to use C99 standards mode, rather than C99 + GNU Extensions.
[pub/USBasp.git] / Demos / Device / ClassDriver / MassStorageKeyboard / Lib / DataflashManager.h
index c5d1264..248fa32 100644 (file)
                #define VIRTUAL_MEMORY_BLOCK_SIZE           512
                
                /** 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)
+               #define VIRTUAL_MEMORY_BLOCKS              (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
+               
+               /** Total number of logical drives within the device - must be non-zero. */
+               #define TOTAL_LUNS                          1
+               
+               /** 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* MSInterfaceInfo, const uint32_t BlockAddress,