1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12 /**************************************************************************/
13 /** */
14 /** USBX Component */
15 /** */
16 /** Device HID Class */
17 /** */
18 /**************************************************************************/
19 /**************************************************************************/
20
21 #define UX_SOURCE_CODE
22
23
24 /* Include necessary system files. */
25
26 #include "ux_api.h"
27 #include "ux_device_class_hid.h"
28 #include "ux_device_stack.h"
29
30
31 #if defined(UX_DEVICE_CLASS_HID_INTERRUPT_OUT_SUPPORT)
32 /**************************************************************************/
33 /* */
34 /* FUNCTION RELEASE */
35 /* */
36 /* _ux_device_class_hid_receiver_uninitialize PORTABLE C */
37 /* 6.1.10 */
38 /* AUTHOR */
39 /* */
40 /* Chaoqiong Xiao, Microsoft Corporation */
41 /* */
42 /* DESCRIPTION */
43 /* */
44 /* This function uninitialize the USB HID device receiver. It's only */
45 /* done once. */
46 /* */
47 /* INPUT */
48 /* */
49 /* receiver Pointer to receiver instance */
50 /* */
51 /* OUTPUT */
52 /* */
53 /* Completion Status */
54 /* */
55 /* CALLS */
56 /* */
57 /* _ux_utility_memory_free Free memory */
58 /* _ux_utility_thread_delete Delete thread */
59 /* */
60 /* CALLED BY */
61 /* */
62 /* USBX Source Code */
63 /* */
64 /* RELEASE HISTORY */
65 /* */
66 /* DATE NAME DESCRIPTION */
67 /* */
68 /* 01-31-2022 Chaoqiong Xiao Initial Version 6.1.10 */
69 /* */
70 /**************************************************************************/
_ux_device_class_hid_receiver_uninitialize(UX_DEVICE_CLASS_HID_RECEIVER * receiver)71 VOID _ux_device_class_hid_receiver_uninitialize(UX_DEVICE_CLASS_HID_RECEIVER *receiver)
72 {
73
74 #if !defined(UX_DEVICE_STANDALONE)
75
76 /* Delete receiver thread. */
77 _ux_utility_thread_delete(&receiver -> ux_device_class_hid_receiver_thread);
78 #endif
79
80 /* Free receiver and events memory. */
81 _ux_utility_memory_free(receiver);
82 }
83 #endif
84