* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _USB_DFU_H
-#define _USB_DFU_H
+#pragma once
// ----- Compiler Includes -----
#ifndef USB_DFU_TRANSFER_SIZE
-#define USB_DFU_TRANSFER_SIZE FLASH_SECTOR_SIZE
+// Sector size is the same as the program flash size
+#if defined(_mk20dx128vlf5_)
+#define USB_DFU_TRANSFER_SIZE FLASH_SECTOR_SIZE
+
+// Sector size is double the program flash size
+#elif defined(_mk20dx256vlh7_ )
+#define USB_DFU_TRANSFER_SIZE FLASH_SECTOR_SIZE / 2
+
+#endif
#endif
#define USB_FUNCTION_DESC_DFU_DECL \
void dfu_init( dfu_setup_read_t setup_read, dfu_setup_write_t setup_write, dfu_finish_write_t finish_write, struct dfu_ctx *ctx );
void dfu_app_init( dfu_detach_t detachcb );
-#endif