echo_d.h
1.43 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
#ifndef __echo_d_h__
#define __echo_d_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:echo_d.h$
*** $Revision: 1.4 $
*** $Date: 2003/08/04 23:30:36 $
***
*** Description:
*** This file contains the VUSBH32 Echo example application header
***
**************************************************************************
*END*********************************************************************/
#define BUFFERSIZE 64
typedef struct buffer_struct { /* Body */
uint_8 buf[BUFFERSIZE];
uint_32 len;
} BUFFER_STRUCT, _PTR_ BUFFER_STRUCT_PTR;
#define INIT_BUF(b) ((b.len) = 0)
#define SPACE_BUF(b) (BUFFERSIZE - ((b).len))
#define DATA_BUF(b) ((b).len)
#define DBUF(b) (&((b).buf[(b).len]))
#define ADD_BUF(b,l) ((b).len += l)
#define TRIM_BUF(b,l) (bcopy(&((b).buf[l]), &((b).buf[0]), l), (b).len -= l)
#endif /* __echo_d_h__ */