Select one of the symbols to view example projects that use it.
 
Outline
Includes
#include "usbd_app.h"
External variables
USBD_Device
USBDSTOR_Start()
USBDSTOR_Connect()
USBDSTOR_Refrech()
USBDSTOR_Disconnect()
USBDSTOR_Stop()
Files
loading...
CodeScopeSTM32 Libraries and SamplesMB1063Modules/usbdevice/usbd_app.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file usbd_app.c * @author MCD Application Team * @brief This file provides the USBD application method. ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Includes ------------------------------------------------------------------*/ #include "usbd_app.h" /** @addtogroup USB_DEVICE_MODULE * @{ *//* ... */ /** @defgroup USB_APPLICATION * @brief usb application routines * @{ *//* ... */ Includes /* External variables --------------------------------------------------------*/ USBD_HandleTypeDef USBD_Device; External variables /* Private typedef -----------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/ /* Private macros ------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ /** * @brief Start USBD * @param None. * @retval USBD status. *//* ... */ USBD_ErrorTypdef USBDSTOR_Start(void) { /* Init MSC Application */ USBD_Init(&USBD_Device, &MSC_Desc, 0); /* Add Supported Class */ USBD_RegisterClass(&USBD_Device, &USBD_MSC); /* Add Storage callbacks for MSC Class */ USBD_MSC_RegisterStorage(&USBD_Device, &USBD_DISK_fops); return USBD_ERROR_NONE; }{ ... } /** * @brief Connect USBD * @param None. * @retval USBD status. *//* ... */ USBD_ErrorTypdef USBDSTOR_Connect(void) { /* Start Device Process */ USBD_Start(&USBD_Device); return USBD_ERROR_NONE; }{ ... } /** * @brief Refresh USBD * @param None. * @retval USBD status. *//* ... */ USBD_ErrorTypdef USBDSTOR_Refrech(void) { return USBD_ERROR_NONE; }{ ... } /** * @brief Stop USBD * @param None. * @retval USBD status. *//* ... */ USBD_ErrorTypdef USBDSTOR_Disconnect(void) { USBD_Stop(&USBD_Device); return USBD_ERROR_NONE; }{ ... } /** * @brief DeInit USBD * @param None. * @retval USBD status. *//* ... */ USBD_ErrorTypdef USBDSTOR_Stop(void) { USBD_DeInit(&USBD_Device); return USBD_ERROR_NONE; }{ ... } /** * @} *//* ... */ /** * @} *//* ... */