Update copyrights for 2018.
[pub/USBasp.git] / Demos / Device / ClassDriver / VirtualSerialMassStorage / Lib / DataflashManager.h
index 0dc4d26..8a817f8 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2018.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2018  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
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
@@ -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,