1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* |
4 |
|
|
* This program and the accompanying materials are made available under the |
5 |
|
|
* terms of the MIT License which is available at |
6 |
|
|
* https://opensource.org/licenses/MIT. |
7 |
|
|
* |
8 |
|
|
* SPDX-License-Identifier: MIT |
9 |
|
|
**************************************************************************/ |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/**************************************************************************/ |
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/** */ |
15 |
|
|
/** USBX Component */ |
16 |
|
|
/** */ |
17 |
|
|
/** HUB Class */ |
18 |
|
|
/** */ |
19 |
|
|
/**************************************************************************/ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
|
22 |
|
|
|
23 |
|
|
/* Include necessary system files. */ |
24 |
|
|
|
25 |
|
|
#define UX_SOURCE_CODE |
26 |
|
|
|
27 |
|
|
#include "ux_api.h" |
28 |
|
|
#include "ux_host_class_hub.h" |
29 |
|
|
#include "ux_host_stack.h" |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _ux_host_class_hub_port_change_enable_process PORTABLE C */ |
37 |
|
|
/* 6.1 */ |
38 |
|
|
/* AUTHOR */ |
39 |
|
|
/* */ |
40 |
|
|
/* Chaoqiong Xiao, Microsoft Corporation */ |
41 |
|
|
/* */ |
42 |
|
|
/* DESCRIPTION */ |
43 |
|
|
/* */ |
44 |
|
|
/* This function will process a enable condition change. */ |
45 |
|
|
/* */ |
46 |
|
|
/* INPUT */ |
47 |
|
|
/* */ |
48 |
|
|
/* hub Pointer to HUB class */ |
49 |
|
|
/* port Port number */ |
50 |
|
|
/* port_status Port status */ |
51 |
|
|
/* */ |
52 |
|
|
/* OUTPUT */ |
53 |
|
|
/* */ |
54 |
|
|
/* None */ |
55 |
|
|
/* */ |
56 |
|
|
/* CALLS */ |
57 |
|
|
/* */ |
58 |
|
|
/* _ux_host_class_hub_feature Set HUB feature */ |
59 |
|
|
/* */ |
60 |
|
|
/* CALLED BY */ |
61 |
|
|
/* */ |
62 |
|
|
/* HUB Class */ |
63 |
|
|
/* */ |
64 |
|
|
/* RELEASE HISTORY */ |
65 |
|
|
/* */ |
66 |
|
|
/* DATE NAME DESCRIPTION */ |
67 |
|
|
/* */ |
68 |
|
|
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */ |
69 |
|
|
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */ |
70 |
|
|
/* resulting in version 6.1 */ |
71 |
|
|
/* */ |
72 |
|
|
/**************************************************************************/ |
73 |
|
1 |
VOID _ux_host_class_hub_port_change_enable_process(UX_HOST_CLASS_HUB *hub, UINT port, UINT port_status) |
74 |
|
|
{ |
75 |
|
|
|
76 |
|
|
UX_PARAMETER_NOT_USED(port_status); |
77 |
|
|
|
78 |
|
|
/* If trace is enabled, insert this event into the trace buffer. */ |
79 |
|
|
UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HUB_PORT_CHANGE_ENABLE_PROCESS, hub, port, port_status, 0, UX_TRACE_HOST_CLASS_EVENTS, 0, 0) |
80 |
|
|
|
81 |
|
|
/* Here we simply clear the condition so that we don't get awaken again. */ |
82 |
|
1 |
_ux_host_class_hub_feature(hub, port, UX_CLEAR_FEATURE, UX_HOST_CLASS_HUB_C_PORT_ENABLE); |
83 |
|
|
|
84 |
|
|
/* Return to caller. */ |
85 |
|
1 |
return; |
86 |
|
|
} |
87 |
|
|
|