33 #ifdef DFU_MAL_SUPPORT_OTP 37 #ifdef DFU_MAL_SUPPORT_MEM 53 #ifdef DFU_MAL_SUPPORT_OTP 56 #ifdef DFU_MAL_SUPPORT_MEM 61 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 62 #if defined ( __ICCARM__ ) 63 #pragma data_alignment=4 69 #ifdef DFU_MAL_SUPPORT_OTP 72 #ifdef DFU_MAL_SUPPORT_MEM 77 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 78 #if defined ( __ICCARM__ ) 79 #pragma data_alignment=4 100 for(memIdx = 0; memIdx < MAX_USED_MEDIA; memIdx++)
103 if (tMALTab[memIdx]->pMAL_Init !=
NULL)
123 for(memIdx = 0; memIdx < MAX_USED_MEDIA; memIdx++)
126 if (tMALTab[memIdx]->pMAL_DeInit !=
NULL)
146 if (DFU_MAL_IS_PROTECTED_AREA(Add))
151 if (memIdx < MAX_USED_MEDIA)
154 if (tMALTab[memIdx]->pMAL_Erase !=
NULL)
181 if (DFU_MAL_IS_PROTECTED_AREA(Add))
186 if (memIdx < MAX_USED_MEDIA)
189 if (tMALTab[memIdx]->pMAL_Write !=
NULL)
215 if (memIdx < MAX_USED_MEDIA)
218 if (tMALTab[memIdx]->pMAL_Read !=
NULL)
220 return tMALTab[memIdx]->
pMAL_Read(Add, Len);
245 if (memIdx < MAX_USED_MEDIA)
275 for(memIdx = 0; memIdx < MAX_USED_MEDIA; memIdx++)
278 if (tMALTab[memIdx]->pMAL_CheckAdd(Add) ==
MAL_OK)
284 return (MAX_USED_MEDIA);
uint16_t MAL_DeInit(void)
MAL_DeInit DeInitializes the Media on the STM32.
#define SET_POLLING_TIMING(x)
uint8_t * MAL_Read(uint32_t Add, uint32_t Len)
MAL_Read Read sectors of memory.
DFU_MAL_Prop_TypeDef DFU_Mem_cb
const uint8_t * usbd_dfu_StringDesc[]
Header for usbd_mem_if_template.c file.
uint16_t(* pMAL_DeInit)(void)
uint8_t *(* pMAL_Read)(uint32_t Add, uint32_t Len)
static uint8_t buffer[BMP280_DATA_FRAME_SIZE]
uint8_t MAL_Buffer[XFERSIZE]
uint16_t(* pMAL_Erase)(uint32_t Add)
uint16_t MAL_Init(void)
MAL_Init Initializes the Media on the STM32.
static uint8_t MAL_CheckAdd(uint32_t Add)
MAL_CheckAdd Determine which memory should be managed.
__ALIGN_BEGIN const uint8_t *usbd_dfu_StringDesc[MAX_USED_MEDIA] __ALIGN_END
uint16_t MAL_GetStatus(uint32_t Add, uint8_t Cmd, uint8_t *buffer)
MAL_GetStatus Get the status of a given memory.
uint16_t(* pMAL_Write)(uint32_t Add, uint32_t Len)
Header for usbd_otp_if.c file.
uint16_t MAL_Write(uint32_t Add, uint32_t Len)
MAL_Write Write sectors of memory.
Header for usbd_dfu_mal.c file.
DFU_MAL_Prop_TypeDef DFU_Flash_cb
DFU_MAL_Prop_TypeDef DFU_Otp_cb
Header for usbd_flash_if.c file.
uint16_t MAL_Erase(uint32_t Add)
MAL_Erase Erase a sector of memory.
uint16_t(* pMAL_Init)(void)
DFU_MAL_Prop_TypeDef * tMALTab[MAX_USED_MEDIA]