1
1
/***************************************************************************
2
- * Copyright (c) 2024 Microsoft Corporation
3
- *
2
+ * Copyright (c) 2024 Microsoft Corporation
3
+ *
4
4
* This program and the accompanying materials are made available under the
5
5
* terms of the MIT License which is available at
6
6
* https://opensource.org/licenses/MIT.
7
- *
7
+ *
8
8
* SPDX-License-Identifier: MIT
9
9
**************************************************************************/
10
10
11
11
/**************************************************************************/
12
12
/**************************************************************************/
13
- /** */
14
- /** USBX Component */
13
+ /** */
14
+ /** USBX Component */
15
15
/** */
16
16
/** DFU Class */
17
17
/** */
18
18
/**************************************************************************/
19
19
/**************************************************************************/
20
20
21
- /**************************************************************************/
22
- /* */
23
- /* COMPONENT DEFINITION RELEASE */
24
- /* */
25
- /* ux_device_class_dfu.h PORTABLE C */
26
- /* 6.3.0 */
21
+ /**************************************************************************/
22
+ /* */
23
+ /* COMPONENT DEFINITION RELEASE */
24
+ /* */
25
+ /* ux_device_class_dfu.h PORTABLE C */
26
+ /* 6.x */
27
27
/* AUTHOR */
28
28
/* */
29
29
/* Chaoqiong Xiao, Microsoft Corporation */
30
30
/* */
31
31
/* DESCRIPTION */
32
- /* */
33
- /* This file defines the equivalences for the USBX Device Class DFU */
34
- /* ACM component. */
35
- /* */
36
- /* RELEASE HISTORY */
37
- /* */
38
- /* DATE NAME DESCRIPTION */
39
- /* */
32
+ /* */
33
+ /* This file defines the equivalences for the USBX Device Class DFU */
34
+ /* ACM component. */
35
+ /* */
36
+ /* RELEASE HISTORY */
37
+ /* */
38
+ /* DATE NAME DESCRIPTION */
39
+ /* */
40
40
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
41
41
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
42
42
/* used UX prefix to refer to */
62
62
/* 10-31-2023 Yajun xia Modified comment(s), */
63
63
/* added error checks support, */
64
64
/* resulting in version 6.3.0 */
65
+ /* xx-xx-xxxx Mohamed ayed Modified comment(s), */
66
+ /* added dfu deinit function, */
67
+ /* remove extra spaces, */
68
+ /* resulting in version 6.x */
65
69
/* */
66
70
/**************************************************************************/
67
71
68
72
#ifndef UX_DEVICE_CLASS_DFU_H
69
73
#define UX_DEVICE_CLASS_DFU_H
70
74
71
- /* Determine if a C++ compiler is being used. If so, ensure that standard
72
- C is used to process the API information. */
75
+ /* Determine if a C++ compiler is being used. If so, ensure that standard
76
+ C is used to process the API information. */
73
77
74
- #ifdef __cplusplus
78
+ #ifdef __cplusplus
75
79
76
- /* Yes, C++ compiler is present. Use standard C. */
77
- extern "C" {
80
+ /* Yes, C++ compiler is present. Use standard C. */
81
+ extern "C" {
78
82
79
- #endif
83
+ #endif
80
84
81
85
/* Internal option: enable the basic USBX error checking. This define is typically used
82
86
while debugging application. */
83
87
#if defined(UX_ENABLE_ERROR_CHECKING ) && !defined(UX_DEVICE_CLASS_DFU_ENABLE_ERROR_CHECKING )
84
88
#define UX_DEVICE_CLASS_DFU_ENABLE_ERROR_CHECKING
85
89
#endif
86
90
87
- /* Define DFU class descriptor capabilities. */
91
+ /* Define DFU class descriptor capabilities. */
88
92
#define UX_SLAVE_CLASS_DFU_CAPABILITY_WILL_DETACH 0x08
89
93
#define UX_SLAVE_CLASS_DFU_CAPABILITY_MANIFESTATION_TOLERANT 0x04
90
94
#define UX_SLAVE_CLASS_DFU_CAPABILITY_CAN_UPLOAD 0x02
@@ -187,7 +191,7 @@ extern "C" {
187
191
/* Define DFU application notification signals. */
188
192
#define UX_SLAVE_CLASS_DFU_MEDIA_STATUS_OK 0
189
193
#define UX_SLAVE_CLASS_DFU_MEDIA_STATUS_BUSY 1
190
- #define UX_SLAVE_CLASS_DFU_MEDIA_STATUS_ERROR 2
194
+ #define UX_SLAVE_CLASS_DFU_MEDIA_STATUS_ERROR 2
191
195
192
196
/* Define DFU thread event signals. */
193
197
#define UX_DEVICE_CLASS_DFU_THREAD_EVENT_DISCONNECT 0x1u
@@ -257,6 +261,7 @@ UINT _ux_device_class_dfu_deactivate(UX_SLAVE_CLASS_COMMAND *command);
257
261
UINT _ux_device_class_dfu_entry (UX_SLAVE_CLASS_COMMAND * command );
258
262
UINT _ux_device_class_dfu_initialize (UX_SLAVE_CLASS_COMMAND * command );
259
263
VOID _ux_device_class_dfu_thread (ULONG dfu_class );
264
+ UINT _ux_device_class_dfu_uninitialize (UX_SLAVE_CLASS_COMMAND * command );
260
265
261
266
UCHAR _ux_device_class_dfu_state_get (UX_SLAVE_CLASS_DFU * dfu );
262
267
VOID _ux_device_class_dfu_state_sync (UX_SLAVE_CLASS_DFU * dfu );
@@ -270,10 +275,10 @@ UINT _uxe_device_class_dfu_initialize(UX_SLAVE_CLASS_COMMAND *command);
270
275
#define ux_device_class_dfu_state_get _ux_device_class_dfu_state_get
271
276
#define ux_device_class_dfu_state_sync _ux_device_class_dfu_state_sync
272
277
273
- /* Determine if a C++ compiler is being used. If so, complete the standard
274
- C conditional started above. */
278
+ /* Determine if a C++ compiler is being used. If so, complete the standard
279
+ C conditional started above. */
275
280
#ifdef __cplusplus
276
- }
277
- #endif
281
+ }
282
+ #endif
278
283
279
284
#endif /* UX_DEVICE_CLASS_DFU_H */
0 commit comments