1 #ifndef UX_DEVICE_CLASS_DUMMY_HUB_H
2 #define UX_DEVICE_CLASS_DUMMY_HUB_H
3 
4 #include <stdio.h>
5 #include "tx_api.h"
6 #include "ux_api.h"
7 #include "ux_system.h"
8 #include "ux_utility.h"
9 #include "ux_device_stack.h"
10 #include "ux_test_dcd_sim_slave.h"
11 #include "ux_test_hcd_sim_host.h"
12 #include "ux_test.h"
13 #include "ux_device_class_dummy.h"
14 #include "ux_host_class_hub.h"
15 
16 typedef struct UX_DEVICE_CLASS_HUB_PARAMS_STRUCT
17 {
18     UCHAR   *descriptor;
19     ULONG   descriptor_length;
20 
21     VOID    (*instance_activate)(VOID *);
22     VOID    (*instance_deactivate)(VOID *);
23 } UX_DEVICE_CLASS_HUB_PARAMS;
24 
25 typedef struct UX_DEVICE_CLASS_HUB_STRUCT
26 {
27     UX_SLAVE_CLASS              *hub_class;
28     UX_SLAVE_ENDPOINT           *interrupt_endpoint;
29 
30     /* Test dummy not depends on standalone switch.  */
31     TX_THREAD                   hub_thread;
32     UCHAR                       *hub_thread_stack;
33 
34     ULONG                       status_change_bitmap;
35     USHORT                      port_status;
36     USHORT                      port_change;
37 
38     UCHAR                       dont_reset_port_when_commanded_to;
39 
40     UX_DEVICE_CLASS_HUB_PARAMS  params;
41 } UX_DEVICE_CLASS_HUB;
42 
43 extern UCHAR _ux_device_class_hub_name[];
44 
45 UINT _ux_device_class_hub_entry(UX_SLAVE_CLASS_COMMAND *);
46 VOID _ux_device_class_hub_notify_changes(UX_DEVICE_CLASS_HUB *hub, UCHAR *changes, UINT rpt_size);
47 VOID _ux_device_class_hub_notify_change(UX_DEVICE_CLASS_HUB *hub, UINT change_pos, UINT rpt_size);
48 
49 #endif