]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Bootloader/dfu.h
Basic code for mk20dx256vlh7 flashing
[kiibohd-controller.git] / Bootloader / dfu.h
index 83d5d2b549bab1dc4a4213ca3b6119b47dd49007..1462746a24cba579fed4c0510e00decaf8da79b8 100644 (file)
 
 
 #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                         \