STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
usbd_dfu_media_template.c
Go to the documentation of this file.
1 
29 /* Includes ------------------------------------------------------------------*/
31 
32 
33 /* Private typedef -----------------------------------------------------------*/
34 /* Private define ------------------------------------------------------------*/
35 /* Private macro -------------------------------------------------------------*/
36 /* Private variables ---------------------------------------------------------*/
37 /* Private function prototypes -----------------------------------------------*/
38 /* Extern function prototypes ------------------------------------------------*/
39 /* Private functions ---------------------------------------------------------*/
40 uint16_t MEM_If_Init(void);
41 uint16_t MEM_If_Erase (uint32_t Add);
42 uint16_t MEM_If_Write (uint8_t *src, uint8_t *dest, uint32_t Len);
43 uint8_t *MEM_If_Read (uint8_t *src, uint8_t *dest, uint32_t Len);
44 uint16_t MEM_If_DeInit(void);
45 uint16_t MEM_If_GetStatus (uint32_t Add, uint8_t Cmd, uint8_t *buffer);
46 
48 {
49  (uint8_t *)"DFU MEDIA",
56 
57 };
64 uint16_t MEM_If_Init(void)
65 {
66  return 0;
67 }
68 
75 uint16_t MEM_If_DeInit(void)
76 {
77  return 0;
78 }
79 
86 uint16_t MEM_If_Erase(uint32_t Add)
87 {
88  return 0;
89 }
90 
98 uint16_t MEM_If_Write(uint8_t *src, uint8_t *dest, uint32_t Len)
99 {
100  return 0;
101 }
102 
110 uint8_t *MEM_If_Read (uint8_t *src, uint8_t *dest, uint32_t Len)
111 {
112  /* Return a valid address to avoid HardFault */
113  return (uint8_t*)(0);
114 }
115 
123 uint16_t MEM_If_GetStatus (uint32_t Add, uint8_t Cmd, uint8_t *buffer)
124 {
125  switch (Cmd)
126  {
127  case DFU_MEDIA_PROGRAM:
128 
129  break;
130 
131  case DFU_MEDIA_ERASE:
132  default:
133 
134  break;
135  }
136  return (0);
137 }
138 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
139 
header file for the usbd_dfu_media_template.c file
USBD_DFU_MediaTypeDef USBD_DFU_MEDIA_Template_fops
uint16_t MEM_If_DeInit(void)
MEM_If_DeInit Memory deinitialization routine.
#define DFU_MEDIA_PROGRAM
Definition: usbd_dfu.h:109
uint16_t MEM_If_Write(uint8_t *src, uint8_t *dest, uint32_t Len)
MEM_If_Write Memory write routine.
uint16_t MEM_If_GetStatus(uint32_t Add, uint8_t Cmd, uint8_t *buffer)
Flash_If_GetStatus Memory read routine.
uint16_t MEM_If_Init(void)
MEM_If_Init Memory initialization routine.
uint8_t * MEM_If_Read(uint8_t *src, uint8_t *dest, uint32_t Len)
MEM_If_Read Memory read routine.
uint16_t MEM_If_Erase(uint32_t Add)
MEM_If_Erase Erase sector.
#define DFU_MEDIA_ERASE
Definition: usbd_dfu.h:108