blob: fcc470bb4c232518bdeb857d9805f2f7bc7b0ec3 (
plain)
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
|
/***************************************************************************/
/* Copyright (c) 2024 Microsoft Corporation */
/* Copyright (c) 2026 Eclipse ThreadX contributors */
/* */
/* This program and the accompanying materials are made available under */
/* the terms of the MIT License which is available at */
/* https://opensource.org/licenses/MIT. */
/* */
/* SPDX-License-Identifier: MIT */
/***************************************************************************/
#ifndef UX_DEVICE_CLASS_DUMMY_HUB_H
#define UX_DEVICE_CLASS_DUMMY_HUB_H
#include <stdio.h>
#include "tx_api.h"
#include "ux_api.h"
#include "ux_system.h"
#include "ux_utility.h"
#include "ux_device_stack.h"
#include "ux_test_dcd_sim_slave.h"
#include "ux_test_hcd_sim_host.h"
#include "ux_test.h"
#include "ux_device_class_dummy.h"
#include "ux_host_class_hub.h"
typedef struct UX_DEVICE_CLASS_HUB_PARAMS_STRUCT
{
UCHAR *descriptor;
ULONG descriptor_length;
VOID (*instance_activate)(VOID *);
VOID (*instance_deactivate)(VOID *);
} UX_DEVICE_CLASS_HUB_PARAMS;
typedef struct UX_DEVICE_CLASS_HUB_STRUCT
{
UX_SLAVE_CLASS *hub_class;
UX_SLAVE_ENDPOINT *interrupt_endpoint;
/* Test dummy not depends on standalone switch. */
TX_THREAD hub_thread;
UCHAR *hub_thread_stack;
ULONG status_change_bitmap;
USHORT port_status;
USHORT port_change;
UCHAR dont_reset_port_when_commanded_to;
UX_DEVICE_CLASS_HUB_PARAMS params;
} UX_DEVICE_CLASS_HUB;
extern UCHAR _ux_device_class_hub_name[];
UINT _ux_device_class_hub_entry(UX_SLAVE_CLASS_COMMAND *);
VOID _ux_device_class_hub_notify_changes(UX_DEVICE_CLASS_HUB *hub, UCHAR *changes, UINT rpt_size);
VOID _ux_device_class_hub_notify_change(UX_DEVICE_CLASS_HUB *hub, UINT change_pos, UINT rpt_size);
#endif
|