1 |
/*---------------------------------------------------------------------------- |
---|
2 |
* Name: DEMO.H |
---|
3 |
* Purpose: USB Audio Demo Definitions |
---|
4 |
* Version: V1.10 |
---|
5 |
*---------------------------------------------------------------------------- |
---|
6 |
* This file is part of the uVision/ARM development tools. |
---|
7 |
* This software may only be used under the terms of a valid, current, |
---|
8 |
* end user licence from KEIL for a compatible version of KEIL software |
---|
9 |
* development tools. Nothing else gives you the right to use it. |
---|
10 |
* |
---|
11 |
* Copyright (c) 2005-2007 Keil Software. |
---|
12 |
*---------------------------------------------------------------------------*/ |
---|
13 |
|
---|
14 |
/* Clock Definitions */ |
---|
15 |
#define CPU_CLOCK 12000000 /* CPU Clock */ |
---|
16 |
#define VPB_CLOCK (CPU_CLOCK/1) /* VPB Clock */ |
---|
17 |
|
---|
18 |
/* Audio Definitions */ |
---|
19 |
#define DATA_FREQ 32000 /* Audio Data Frequency */ |
---|
20 |
#define P_S 32 /* Packet Size */ |
---|
21 |
#if USB_DMA |
---|
22 |
#define P_C 4 /* Packet Count */ |
---|
23 |
#else |
---|
24 |
#define P_C 1 /* Packet Count */ |
---|
25 |
#endif |
---|
26 |
#define B_S (8*P_C*P_S) /* Buffer Size */ |
---|
27 |
|
---|
28 |
/* Push Button Definitions */ |
---|
29 |
#define PBINT 0x00000400 /* P2.10 */ |
---|
30 |
|
---|
31 |
/* LED Definitions */ |
---|
32 |
#define LEDMSK 0x000000FF /* P2.0..7 */ |
---|
33 |
|
---|
34 |
/* Audio Demo Variables */ |
---|
35 |
extern BYTE Mute; /* Mute State */ |
---|
36 |
extern DWORD Volume; /* Volume Level */ |
---|
37 |
extern WORD VolCur; /* Volume Current Value */ |
---|
38 |
extern DWORD InfoBuf[P_C]; /* Packet Info Buffer */ |
---|
39 |
extern short DataBuf[B_S]; /* Data Buffer */ |
---|
40 |
extern WORD DataOut; /* Data Out Index */ |
---|
41 |
extern WORD DataIn; /* Data In Index */ |
---|
42 |
extern BYTE DataRun; /* Data Stream Run State */ |
---|