diff --git a/src/usb/msc_uf2.h b/src/usb/msc_uf2.h index c325d21..fdbbe55 100644 --- a/src/usb/msc_uf2.h +++ b/src/usb/msc_uf2.h @@ -44,21 +44,22 @@ // for checking flash size #include "dfu_types.h" +#include "uf2/uf2.h" /*------------------------------------------------------------------*/ /* FLASH Configuration *------------------------------------------------------------------*/ -#define MSC_FLASH_ADDR_START 0xAD000 -#define MSC_FLASH_SIZE (256*1024) +#define MSC_FLASH_ADDR_START 0xAD000 +#define MSC_FLASH_SIZE (256*1024) -#define MSC_FLASH_BLOCK_SIZE 512 -#define MSC_FLASH_BLOCK_NUM (MSC_FLASH_SIZE/MSC_FLASH_BLOCK_SIZE) - -VERIFY_STATIC( MSC_FLASH_ADDR_START+MSC_FLASH_SIZE == BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED, ); +#define MSC_UF2_BLOCK_SIZE 512 +#define MSC_UF2_BLOCK_NUM UF2_NUM_BLOCKS // must be 11 bytes padded with space #define MSC_FLASH_VOL_LABEL "NRF52BOOT " +VERIFY_STATIC( MSC_FLASH_ADDR_START+MSC_FLASH_SIZE == BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED, ); + /*------------------------------------------------------------------*/ /* Note ATTR_WEAK is used when CFG_TUD_MSC = 0 *------------------------------------------------------------------*/