1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
31
34
35
36
37
38
39
40
41
46
47
48
49
50
51
52
53
54
55
56
57
58
59
64
71
72
77
81
82
87
92
93
94
99
104
107
108
/* ... */
#include "usbd_app.h"
/* ... */
/* ... */
Includes
USBD_HandleTypeDef USBD_Device;
External variables
/* ... */
USBD_ErrorTypdef USBDSTOR_Start(void)
{
USBD_Init(&USBD_Device, &MSC_Desc, 0);
USBD_RegisterClass(&USBD_Device, &USBD_MSC);
USBD_MSC_RegisterStorage(&USBD_Device, &USBD_DISK_fops);
return USBD_ERROR_NONE;
}{ ... }
/* ... */
USBD_ErrorTypdef USBDSTOR_Connect(void)
{
USBD_Start(&USBD_Device);
return USBD_ERROR_NONE;
}{ ... }
/* ... */
USBD_ErrorTypdef USBDSTOR_Refrech(void)
{
return USBD_ERROR_NONE;
}{ ... }
/* ... */
USBD_ErrorTypdef USBDSTOR_Disconnect(void)
{
USBD_Stop(&USBD_Device);
return USBD_ERROR_NONE;
}{ ... }
/* ... */
USBD_ErrorTypdef USBDSTOR_Stop(void)
{
USBD_DeInit(&USBD_Device);
return USBD_ERROR_NONE;
}{ ... }
/* ... */
/* ... */