test_h.h 3.42 KB
#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