test_h.h
3.42 KB
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
#ifndef __test_h_h__
#define __test_h_h__
/*HEADER******************************************************************
**************************************************************************
***
*** Copyright (c) 2001-2002 ARC International.
*** All rights reserved
***
*** This software embodies materials and concepts which are
*** confidential to ARC International and is made
*** available solely pursuant to the terms of a written license
*** agreement with ARC International
***
*** $Workfile:test.h$
*** $Revision: 1.1 $
*** $Date: 2003/02/17 20:49:00 $
***
*** Description:
*** This file contains the Test specific data structures and defines
***
**************************************************************************
*END*********************************************************************/
#define DATA_SIZE (300)
#define DEMO_CONFIG_DESC_SIZE (64)
#define BIDIRECTIONAL (0x4d)
/* Setup */
typedef struct
{
uchar BREQUESTTYPE;
uchar BREQUEST;
uint_16 WVALUE;
uint_16 WINDEX;
uint_16 WLENGTH;
} USB_SETUP, _PTR_ USB_SETUP_PTR;
/* Standard Device decriptors */
typedef struct dev_desc
{
uchar BLENGTH;
uchar BDESCTYPE;
uint_16 BCDUSB;
uchar BDEVICECLASS;
uchar BDEVICESUBCLASS;
uchar BDEVICEPROTOCOL;
uchar BMAXPACKETSIZE;
uint_16 IDVENDOR;
uint_16 IDPRODUCT;
uint_16 BCDDEVICE;
uchar BMANUFACTURER;
uchar BPRODUCT;
uchar BSERIALNUMBER;
uchar BNUMCONFIGURATIONS;
} USB_DEV_DESC, _PTR_ USB_DEV_DESC_PTR;
typedef struct app_global_struct
{
uint_8 USB_CURRENT_ADDRESS;
int_16 DEFAULT_PIPE;
int_16 APP_PIPE1;
volatile boolean DO_HNP;
volatile boolean DO_SRP;
volatile boolean DO_NORMAL;
volatile boolean ENUMERATION_DONE;
volatile boolean DEVICE_DETACHED;
volatile boolean TRANSACTION_COMPLETE;
int_16 PIPE_INT_IN;
int_16 PIPE_INT_OUT;
int_16 PIPE_BULK_IN;
int_16 PIPE_BULK_OUT;
int_16 PIPE_ISO_IN;
int_16 PIPE_ISO_OUT;
uchar INTDATAOUT[DATA_SIZE];
uchar INTDATAIN[DATA_SIZE];
uchar BULKDATAOUT[DATA_SIZE];
uchar BULKDATAIN[DATA_SIZE];
uchar ISODATAOUT[DATA_SIZE];
uchar ISODATAIN[DATA_SIZE];
uchar RX_TEST_BUFFER[20];
USB_DEV_DESC RX_DESC_DEVICE;
uint_8 RX_CONFIG_DESC[DEMO_CONFIG_DESC_SIZE];
} APP_GLOBAL_STRUCT, _PTR_ APP_GLOBAL_STRUCT_PTR;
extern USB_SETUP tx_get_status;
extern USB_SETUP tx_clear_feature;
extern USB_SETUP tx_set_feature;
extern USB_SETUP tx_synch_frame;
extern USB_SETUP tx_get_desc;
extern USB_SETUP tx_get_config_desc;
extern USB_SETUP tx_set_address;
extern USB_SETUP tx_get_config;
extern USB_SETUP tx_set_config;
extern USB_SETUP tx_set_interface;
extern USB_SETUP tx_get_interface;
extern USB_SETUP tx_get_alt_interface;
extern USB_SETUP tx_get_port_status;
extern USB_SETUP tx_enable_echo;
#endif