33 static uint8_t Flash_If_Init (
void);
34 static uint8_t Flash_If_DeInit (
void);
35 static uint8_t Flash_If_Erase (uint32_t Addr);
36 static uint8_t Flash_If_Write (uint32_t Addr, uint32_t Len);
37 static uint8_t* Flash_If_Read (uint32_t Addr, uint32_t Len);
38 static uint8_t Flash_If_CheckAddr (uint32_t Addr);
69 static uint8_t Flash_If_Init (
void)
82 static uint8_t Flash_If_DeInit (
void)
95 static uint8_t Flash_If_Erase (uint32_t Addr)
109 static uint8_t Flash_If_Write (uint32_t Addr, uint32_t Len)
115 for (idx = Len; idx < ((Len & 0xFFFC) + 4); idx++)
117 MAL_Buffer[idx] = 0xFF;
122 for (idx = 0; idx < Len; idx += 4)
124 FMC_ProgramWord(Addr, *(uint32_t *)(MAL_Buffer + idx));
137 static uint8_t* Flash_If_Read (uint32_t Addr, uint32_t Len)
139 return (uint8_t *)(Addr);
147 static uint8_t Flash_If_CheckAddr (uint32_t Addr)
149 if ((Addr >= FLASH_START_ADDR) && (Addr < FLASH_END_ADDR))
USB DFU device flash interface header file.