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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
* Copyright (c) 2026-present 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
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** USBX Component */
/** */
/** Host Data Pump Class */
/** */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_class_dpump.h PORTABLE C */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file contains all the header and extern functions used by the */
/* USBX demo data pump class. */
/* */
/**************************************************************************/
#ifndef UX_HOST_CLASS_DPUMP_H
#define UX_HOST_CLASS_DPUMP_H
/* Determine if a C++ compiler is being used. If so, ensure that standard
C is used to process the API information. */
#ifdef __cplusplus
/* Yes, C++ compiler is present. Use standard C. */
extern "C" {
#endif
/* Define Data Pump Class constants. */
#define UX_HOST_CLASS_DPUMP_CLASS_TRANSFER_TIMEOUT 300000
#define UX_HOST_CLASS_DPUMP_CLASS 0x99
#define UX_HOST_CLASS_DPUMP_SUBCLASS 0x99
#define UX_HOST_CLASS_DPUMP_PROTOCOL 0x99
/* Define Data Pump Class packet equivalences. */
#define UX_HOST_CLASS_DPUMP_PACKET_SIZE 128
/* Define Data Pump Class Ioctl functions. */
#define UX_HOST_CLASS_DPUMP_SELECT_ALTERNATE_SETTING 1
/* Define Data Pump Class string constants. */
#define UX_HOST_CLASS_DPUMP_GENERIC_NAME "USB DPUMP"
/* Define R/W lock bits for standalone mode. */
#define UX_HOST_CLASS_DPUMP_READ_LOCK (1u<<0)
#define UX_HOST_CLASS_DPUMP_WRITE_LOCK (1u<<1)
/* Define Printer Class function prototypes. */
UINT _ux_host_class_dpump_activate(UX_HOST_CLASS_COMMAND *command);
UINT _ux_host_class_dpump_configure(UX_HOST_CLASS_DPUMP *dpump);
UINT _ux_host_class_dpump_deactivate(UX_HOST_CLASS_COMMAND *command);
UINT _ux_host_class_dpump_endpoints_get(UX_HOST_CLASS_DPUMP *dpump);
UINT _ux_host_class_dpump_entry(UX_HOST_CLASS_COMMAND *command);
UINT _ux_host_class_dpump_read (UX_HOST_CLASS_DPUMP *dpump, UCHAR *data_pointer,
ULONG requested_length, ULONG *actual_length);
UINT _ux_host_class_dpump_write(UX_HOST_CLASS_DPUMP *dpump, UCHAR * data_pointer,
ULONG requested_length, ULONG *actual_length);
UINT _ux_host_class_dpump_ioctl(UX_HOST_CLASS_DPUMP *dpump, ULONG ioctl_function,
VOID *parameter);
#define ux_host_class_dpump_entry _ux_host_class_dpump_entry
#define ux_host_class_dpump_read _ux_host_class_dpump_read
#define ux_host_class_dpump_write _ux_host_class_dpump_write
#define ux_host_class_dpump_ioctl _ux_host_class_dpump_ioctl
/* Determine if a C++ compiler is being used. If so, complete the standard
C conditional started above. */
#ifdef __cplusplus
}
#endif
#endif
|