echo.h
1.64 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
#ifndef __echo_h__
#define __echo_h__
/*HEADER******************************************************************
**************************************************************************
***
*** Copyright (c) 1989-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:echo.h$
*** $Revision: 1.1 $
*** $Date: 2003/02/17 20:49:00 $
***
*** Description:
*** This file contains the USB 1.1 Echo example application header.
***
**************************************************************************
*END*********************************************************************/
/* USB 1.1 Setup Packet */
typedef struct setup_struct {
uint_8 REQUESTTYPE;
uint_8 REQUEST;
uint_16 VALUE;
uint_16 INDEX;
uint_16 LENGTH;
} SETUP_STRUCT, _PTR_ SETUP_STRUCT_PTR;
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define BUFFERSIZE 1023
typedef struct double_buffer_struct { /* Body */
uint_8 buffer[2][BUFFERSIZE];
boolean whichbuffer;
} DOUBLE_BUFFER_STRUCT, _PTR_ DOUBLE_BUFFER_STRUCT_PTR;
#define INIT_DBUF(x) ((x.whichbuffer) = 0)
#define TOGGLE_DBUF(x) ((x.whichbuffer) ^= 1)
#define DBUF(x) (x.buffer[x.whichbuffer])
#endif
/* EOF */