| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
usbd_adc.h
Go to the documentation of this file.
1 /***********************************************************************
2 * $Id: adc_def.h 8129 2011-09-26 22:49:26Z usb10131 $
3 *
4 * Project: LPC18xx Validation
5 *
6 * Description: USB ADC example project.
7 *
8 * Copyright(C) 2011, NXP Semiconductor
9 * All rights reserved.
10 *
11 ***********************************************************************
12 * Software that is described herein is for illustrative purposes only
13 * which provides customers with programming information regarding the
14 * products. This software is supplied "AS IS" without any warranties.
15 * NXP Semiconductors assumes no responsibility or liability for the
16 * use of the software, conveys no license or title under any patent,
17 * copyright, or mask work right to the product. NXP Semiconductors
18 * reserves the right to make changes in the software without
19 * notification. NXP Semiconductors also make no representation or
20 * warranty that such application will be suitable for the specified
21 * use without further testing or modification.
22 **********************************************************************/
23
24 #ifndef __AUDIO_H__
25 #define __AUDIO_H__
26
27
28 /* Audio Interface Subclass Codes */
29 #define AUDIO_SUBCLASS_UNDEFINED 0x00
30 #define AUDIO_SUBCLASS_AUDIOCONTROL 0x01
31 #define AUDIO_SUBCLASS_AUDIOSTREAMING 0x02
32 #define AUDIO_SUBCLASS_MIDISTREAMING 0x03
33
34 /* Audio Interface Protocol Codes */
35 #define AUDIO_PROTOCOL_UNDEFINED 0x00
36
37
38 /* Audio Descriptor Types */
39 #define AUDIO_UNDEFINED_DESCRIPTOR_TYPE 0x20
40 #define AUDIO_DEVICE_DESCRIPTOR_TYPE 0x21
41 #define AUDIO_CONFIGURATION_DESCRIPTOR_TYPE 0x22
42 #define AUDIO_STRING_DESCRIPTOR_TYPE 0x23
43 #define AUDIO_INTERFACE_DESCRIPTOR_TYPE 0x24
44 #define AUDIO_ENDPOINT_DESCRIPTOR_TYPE 0x25
45
46
47 /* Audio Control Interface Descriptor Subtypes */
48 #define AUDIO_CONTROL_UNDEFINED 0x00
49 #define AUDIO_CONTROL_HEADER 0x01
50 #define AUDIO_CONTROL_INPUT_TERMINAL 0x02
51 #define AUDIO_CONTROL_OUTPUT_TERMINAL 0x03
52 #define AUDIO_CONTROL_MIXER_UNIT 0x04
53 #define AUDIO_CONTROL_SELECTOR_UNIT 0x05
54 #define AUDIO_CONTROL_FEATURE_UNIT 0x06
55 #define AUDIO_CONTROL_PROCESSING_UNIT 0x07
56 #define AUDIO_CONTROL_EXTENSION_UNIT 0x08
57
58 /* Audio Streaming Interface Descriptor Subtypes */
59 #define AUDIO_STREAMING_UNDEFINED 0x00
60 #define AUDIO_STREAMING_GENERAL 0x01
61 #define AUDIO_STREAMING_FORMAT_TYPE 0x02
62 #define AUDIO_STREAMING_FORMAT_SPECIFIC 0x03
63
64 /* Audio Endpoint Descriptor Subtypes */
65 #define AUDIO_ENDPOINT_UNDEFINED 0x00
66 #define AUDIO_ENDPOINT_GENERAL 0x01
67
68
69 /* Audio Descriptor Sizes */
70 #define AUDIO_CONTROL_INTERFACE_DESC_SZ(n) (0x08+(n))
71 #define AUDIO_STREAMING_INTERFACE_DESC_SIZE 0x07
72 #define AUDIO_INPUT_TERMINAL_DESC_SIZE 0x0C
73 #define AUDIO_OUTPUT_TERMINAL_DESC_SIZE 0x09
74 #define AUDIO_MIXER_UNIT_DESC_SZ(p,n) (0x0A+(p)+(n))
75 #define AUDIO_SELECTOR_UNIT_DESC_SZ(p) (0x06+(p))
76 #define AUDIO_FEATURE_UNIT_DESC_SZ(ch,n) (0x07+((ch)+1)*(n))
77 #define AUDIO_PROCESSING_UNIT_DESC_SZ(p,n,x) (0x0D+(p)+(n)+(x))
78 #define AUDIO_EXTENSION_UNIT_DESC_SZ(p,n) (0x0D+(p)+(n))
79 #define AUDIO_STANDARD_ENDPOINT_DESC_SIZE 0x09
80 #define AUDIO_STREAMING_ENDPOINT_DESC_SIZE 0x07
81
82
83 /* Audio Processing Unit Process Types */
84 #define AUDIO_UNDEFINED_PROCESS 0x00
85 #define AUDIO_UP_DOWN_MIX_PROCESS 0x01
86 #define AUDIO_DOLBY_PROLOGIC_PROCESS 0x02
87 #define AUDIO_3D_STEREO_PROCESS 0x03
88 #define AUDIO_REVERBERATION_PROCESS 0x04
89 #define AUDIO_CHORUS_PROCESS 0x05
90 #define AUDIO_DYN_RANGE_COMP_PROCESS 0x06
91
92
93 /* Audio Request Codes */
94 #define AUDIO_REQUEST_UNDEFINED 0x00
95 #define AUDIO_REQUEST_SET_CUR 0x01
96 #define AUDIO_REQUEST_GET_CUR 0x81
97 #define AUDIO_REQUEST_SET_MIN 0x02
98 #define AUDIO_REQUEST_GET_MIN 0x82
99 #define AUDIO_REQUEST_SET_MAX 0x03
100 #define AUDIO_REQUEST_GET_MAX 0x83
101 #define AUDIO_REQUEST_SET_RES 0x04
102 #define AUDIO_REQUEST_GET_RES 0x84
103 #define AUDIO_REQUEST_SET_MEM 0x05
104 #define AUDIO_REQUEST_GET_MEM 0x85
105 #define AUDIO_REQUEST_GET_STAT 0xFF
106
107
108 /* Audio Control Selector Codes */
109 #define AUDIO_CONTROL_UNDEFINED 0x00 /* Common Selector */
110
111 /* Terminal Control Selectors */
112 #define AUDIO_COPY_PROTECT_CONTROL 0x01
113
114 /* Feature Unit Control Selectors */
115 #define AUDIO_MUTE_CONTROL 0x01
116 #define AUDIO_VOLUME_CONTROL 0x02
117 #define AUDIO_BASS_CONTROL 0x03
118 #define AUDIO_MID_CONTROL 0x04
119 #define AUDIO_TREBLE_CONTROL 0x05
120 #define AUDIO_GRAPHIC_EQUALIZER_CONTROL 0x06
121 #define AUDIO_AUTOMATIC_GAIN_CONTROL 0x07
122 #define AUDIO_DELAY_CONTROL 0x08
123 #define AUDIO_BASS_BOOST_CONTROL 0x09
124 #define AUDIO_LOUDNESS_CONTROL 0x0A
125
126 /* Processing Unit Control Selectors: */
127 #define AUDIO_ENABLE_CONTROL 0x01 /* Common Selector */
128 #define AUDIO_MODE_SELECT_CONTROL 0x02 /* Common Selector */
129
130 /* - Up/Down-mix Control Selectors */
131 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
132 /* AUDIO_MODE_SELECT_CONTROL 0x02 Common Selector */
133
134 /* - Dolby Prologic Control Selectors */
135 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
136 /* AUDIO_MODE_SELECT_CONTROL 0x02 Common Selector */
137
138 /* - 3D Stereo Extender Control Selectors */
139 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
140 #define AUDIO_SPACIOUSNESS_CONTROL 0x02
141
142 /* - Reverberation Control Selectors */
143 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
144 #define AUDIO_REVERB_LEVEL_CONTROL 0x02
145 #define AUDIO_REVERB_TIME_CONTROL 0x03
146 #define AUDIO_REVERB_FEEDBACK_CONTROL 0x04
147
148 /* - Chorus Control Selectors */
149 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
150 #define AUDIO_CHORUS_LEVEL_CONTROL 0x02
151 #define AUDIO_SHORUS_RATE_CONTROL 0x03
152 #define AUDIO_CHORUS_DEPTH_CONTROL 0x04
153
154 /* - Dynamic Range Compressor Control Selectors */
155 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
156 #define AUDIO_COMPRESSION_RATE_CONTROL 0x02
157 #define AUDIO_MAX_AMPL_CONTROL 0x03
158 #define AUDIO_THRESHOLD_CONTROL 0x04
159 #define AUDIO_ATTACK_TIME_CONTROL 0x05
160 #define AUDIO_RELEASE_TIME_CONTROL 0x06
161
162 /* Extension Unit Control Selectors */
163 /* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
164
165 /* Endpoint Control Selectors */
166 #define AUDIO_SAMPLING_FREQ_CONTROL 0x01
167 #define AUDIO_PITCH_CONTROL 0x02
168
169
170 /* Audio Format Specific Control Selectors */
171
172 /* MPEG Control Selectors */
173 #define AUDIO_MPEG_CONTROL_UNDEFINED 0x00
174 #define AUDIO_MPEG_DUAL_CHANNEL_CONTROL 0x01
175 #define AUDIO_MPEG_SECOND_STEREO_CONTROL 0x02
176 #define AUDIO_MPEG_MULTILINGUAL_CONTROL 0x03
177 #define AUDIO_MPEG_DYN_RANGE_CONTROL 0x04
178 #define AUDIO_MPEG_SCALING_CONTROL 0x05
179 #define AUDIO_MPEG_HILO_SCALING_CONTROL 0x06
180
181 /* AC-3 Control Selectors */
182 #define AUDIO_AC3_CONTROL_UNDEFINED 0x00
183 #define AUDIO_AC3_MODE_CONTROL 0x01
184 #define AUDIO_AC3_DYN_RANGE_CONTROL 0x02
185 #define AUDIO_AC3_SCALING_CONTROL 0x03
186 #define AUDIO_AC3_HILO_SCALING_CONTROL 0x04
187
188
189 /* Audio Format Types */
190 #define AUDIO_FORMAT_TYPE_UNDEFINED 0x00
191 #define AUDIO_FORMAT_TYPE_I 0x01
192 #define AUDIO_FORMAT_TYPE_II 0x02
193 #define AUDIO_FORMAT_TYPE_III 0x03
194
195
196 /* Audio Format Type Descriptor Sizes */
197 #define AUDIO_FORMAT_TYPE_I_DESC_SZ(n) (0x08+(n*3))
198 #define AUDIO_FORMAT_TYPE_II_DESC_SZ(n) (0x09+(n*3))
199 #define AUDIO_FORMAT_TYPE_III_DESC_SZ(n) (0x08+(n*3))
200 #define AUDIO_FORMAT_MPEG_DESC_SIZE 0x09
201 #define AUDIO_FORMAT_AC3_DESC_SIZE 0x0A
202
203
204 /* Audio Data Format Codes */
205
206 /* Audio Data Format Type I Codes */
207 #define AUDIO_FORMAT_TYPE_I_UNDEFINED 0x0000
208 #define AUDIO_FORMAT_PCM 0x0001
209 #define AUDIO_FORMAT_PCM8 0x0002
210 #define AUDIO_FORMAT_IEEE_FLOAT 0x0003
211 #define AUDIO_FORMAT_ALAW 0x0004
212 #define AUDIO_FORMAT_MULAW 0x0005
213
214 /* Audio Data Format Type II Codes */
215 #define AUDIO_FORMAT_TYPE_II_UNDEFINED 0x1000
216 #define AUDIO_FORMAT_MPEG 0x1001
217 #define AUDIO_FORMAT_AC3 0x1002
218
219 /* Audio Data Format Type III Codes */
220 #define AUDIO_FORMAT_TYPE_III_UNDEFINED 0x2000
221 #define AUDIO_FORMAT_IEC1937_AC3 0x2001
222 #define AUDIO_FORMAT_IEC1937_MPEG1_L1 0x2002
223 #define AUDIO_FORMAT_IEC1937_MPEG1_L2_3 0x2003
224 #define AUDIO_FORMAT_IEC1937_MPEG2_NOEXT 0x2003
225 #define AUDIO_FORMAT_IEC1937_MPEG2_EXT 0x2004
226 #define AUDIO_FORMAT_IEC1937_MPEG2_L1_LS 0x2005
227 #define AUDIO_FORMAT_IEC1937_MPEG2_L2_3 0x2006
228
229
230 /* Predefined Audio Channel Configuration Bits */
231 #define AUDIO_CHANNEL_M 0x0000 /* Mono */
232 #define AUDIO_CHANNEL_L 0x0001 /* Left Front */
233 #define AUDIO_CHANNEL_R 0x0002 /* Right Front */
234 #define AUDIO_CHANNEL_C 0x0004 /* Center Front */
235 #define AUDIO_CHANNEL_LFE 0x0008 /* Low Freq. Enhance. */
236 #define AUDIO_CHANNEL_LS 0x0010 /* Left Surround */
237 #define AUDIO_CHANNEL_RS 0x0020 /* Right Surround */
238 #define AUDIO_CHANNEL_LC 0x0040 /* Left of Center */
239 #define AUDIO_CHANNEL_RC 0x0080 /* Right of Center */
240 #define AUDIO_CHANNEL_S 0x0100 /* Surround */
241 #define AUDIO_CHANNEL_SL 0x0200 /* Side Left */
242 #define AUDIO_CHANNEL_SR 0x0400 /* Side Right */
243 #define AUDIO_CHANNEL_T 0x0800 /* Top */
244
245
246 /* Feature Unit Control Bits */
247 #define AUDIO_CONTROL_MUTE 0x0001
248 #define AUDIO_CONTROL_VOLUME 0x0002
249 #define AUDIO_CONTROL_BASS 0x0004
250 #define AUDIO_CONTROL_MID 0x0008
251 #define AUDIO_CONTROL_TREBLE 0x0010
252 #define AUDIO_CONTROL_GRAPHIC_EQUALIZER 0x0020
253 #define AUDIO_CONTROL_AUTOMATIC_GAIN 0x0040
254 #define AUDIO_CONTROL_DEALY 0x0080
255 #define AUDIO_CONTROL_BASS_BOOST 0x0100
256 #define AUDIO_CONTROL_LOUDNESS 0x0200
257
258 /* Processing Unit Control Bits: */
259 #define AUDIO_CONTROL_ENABLE 0x0001 /* Common Bit */
260 #define AUDIO_CONTROL_MODE_SELECT 0x0002 /* Common Bit */
261
262 /* - Up/Down-mix Control Bits */
263 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
264 /* AUDIO_CONTROL_MODE_SELECT 0x0002 Common Bit */
265
266 /* - Dolby Prologic Control Bits */
267 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
268 /* AUDIO_CONTROL_MODE_SELECT 0x0002 Common Bit */
269
270 /* - 3D Stereo Extender Control Bits */
271 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
272 #define AUDIO_CONTROL_SPACIOUSNESS 0x0002
273
274 /* - Reverberation Control Bits */
275 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
276 #define AUDIO_CONTROL_REVERB_TYPE 0x0002
277 #define AUDIO_CONTROL_REVERB_LEVEL 0x0004
278 #define AUDIO_CONTROL_REVERB_TIME 0x0008
279 #define AUDIO_CONTROL_REVERB_FEEDBACK 0x0010
280
281 /* - Chorus Control Bits */
282 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
283 #define AUDIO_CONTROL_CHORUS_LEVEL 0x0002
284 #define AUDIO_CONTROL_SHORUS_RATE 0x0004
285 #define AUDIO_CONTROL_CHORUS_DEPTH 0x0008
286
287 /* - Dynamic Range Compressor Control Bits */
288 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
289 #define AUDIO_CONTROL_COMPRESSION_RATE 0x0002
290 #define AUDIO_CONTROL_MAX_AMPL 0x0004
291 #define AUDIO_CONTROL_THRESHOLD 0x0008
292 #define AUDIO_CONTROL_ATTACK_TIME 0x0010
293 #define AUDIO_CONTROL_RELEASE_TIME 0x0020
294
295 /* Extension Unit Control Bits */
296 /* AUDIO_CONTROL_ENABLE 0x0001 Common Bit */
297
298 /* Endpoint Control Bits */
299 #define AUDIO_CONTROL_SAMPLING_FREQ 0x01
300 #define AUDIO_CONTROL_PITCH 0x02
301 #define AUDIO_MAX_PACKETS_ONLY 0x80
302
303
304 /* Audio Terminal Types */
305
306 /* USB Terminal Types */
307 #define AUDIO_TERMINAL_USB_UNDEFINED 0x0100
308 #define AUDIO_TERMINAL_USB_STREAMING 0x0101
309 #define AUDIO_TERMINAL_USB_VENDOR_SPECIFIC 0x01FF
310
311 /* Input Terminal Types */
312 #define AUDIO_TERMINAL_INPUT_UNDEFINED 0x0200
313 #define AUDIO_TERMINAL_MICROPHONE 0x0201
314 #define AUDIO_TERMINAL_DESKTOP_MICROPHONE 0x0202
315 #define AUDIO_TERMINAL_PERSONAL_MICROPHONE 0x0203
316 #define AUDIO_TERMINAL_OMNI_DIR_MICROPHONE 0x0204
317 #define AUDIO_TERMINAL_MICROPHONE_ARRAY 0x0205
318 #define AUDIO_TERMINAL_PROCESSING_MIC_ARRAY 0x0206
319
320 /* Output Terminal Types */
321 #define AUDIO_TERMINAL_OUTPUT_UNDEFINED 0x0300
322 #define AUDIO_TERMINAL_SPEAKER 0x0301
323 #define AUDIO_TERMINAL_HEADPHONES 0x0302
324 #define AUDIO_TERMINAL_HEAD_MOUNTED_AUDIO 0x0303
325 #define AUDIO_TERMINAL_DESKTOP_SPEAKER 0x0304
326 #define AUDIO_TERMINAL_ROOM_SPEAKER 0x0305
327 #define AUDIO_TERMINAL_COMMUNICATION_SPEAKER 0x0306
328 #define AUDIO_TERMINAL_LOW_FREQ_SPEAKER 0x0307
329
330 /* Bi-directional Terminal Types */
331 #define AUDIO_TERMINAL_BIDIRECTIONAL_UNDEFINED 0x0400
332 #define AUDIO_TERMINAL_HANDSET 0x0401
333 #define AUDIO_TERMINAL_HEAD_MOUNTED_HANDSET 0x0402
334 #define AUDIO_TERMINAL_SPEAKERPHONE 0x0403
335 #define AUDIO_TERMINAL_SPEAKERPHONE_ECHOSUPRESS 0x0404
336 #define AUDIO_TERMINAL_SPEAKERPHONE_ECHOCANCEL 0x0405
337
338 /* Telephony Terminal Types */
339 #define AUDIO_TERMINAL_TELEPHONY_UNDEFINED 0x0500
340 #define AUDIO_TERMINAL_PHONE_LINE 0x0501
341 #define AUDIO_TERMINAL_TELEPHONE 0x0502
342 #define AUDIO_TERMINAL_DOWN_LINE_PHONE 0x0503
343
344 /* External Terminal Types */
345 #define AUDIO_TERMINAL_EXTERNAL_UNDEFINED 0x0600
346 #define AUDIO_TERMINAL_ANALOG_CONNECTOR 0x0601
347 #define AUDIO_TERMINAL_DIGITAL_AUDIO_INTERFACE 0x0602
348 #define AUDIO_TERMINAL_LINE_CONNECTOR 0x0603
349 #define AUDIO_TERMINAL_LEGACY_AUDIO_CONNECTOR 0x0604
350 #define AUDIO_TERMINAL_SPDIF_INTERFACE 0x0605
351 #define AUDIO_TERMINAL_1394_DA_STREAM 0x0606
352 #define AUDIO_TERMINAL_1394_DA_STREAM_TRACK 0x0607
353
354 /* Embedded Function Terminal Types */
355 #define AUDIO_TERMINAL_EMBEDDED_UNDEFINED 0x0700
356 #define AUDIO_TERMINAL_CALIBRATION_NOISE 0x0701
357 #define AUDIO_TERMINAL_EQUALIZATION_NOISE 0x0702
358 #define AUDIO_TERMINAL_CD_PLAYER 0x0703
359 #define AUDIO_TERMINAL_DAT 0x0704
360 #define AUDIO_TERMINAL_DCC 0x0705
361 #define AUDIO_TERMINAL_MINI_DISK 0x0706
362 #define AUDIO_TERMINAL_ANALOG_TAPE 0x0707
363 #define AUDIO_TERMINAL_PHONOGRAPH 0x0708
364 #define AUDIO_TERMINAL_VCR_AUDIO 0x0709
365 #define AUDIO_TERMINAL_VIDEO_DISC_AUDIO 0x070A
366 #define AUDIO_TERMINAL_DVD_AUDIO 0x070B
367 #define AUDIO_TERMINAL_TV_TUNER_AUDIO 0x070C
368 #define AUDIO_TERMINAL_SATELLITE_RECEIVER_AUDIO 0x070D
369 #define AUDIO_TERMINAL_CABLE_TUNER_AUDIO 0x070E
370 #define AUDIO_TERMINAL_DSS_AUDIO 0x070F
371 #define AUDIO_TERMINAL_RADIO_RECEIVER 0x0710
372 #define AUDIO_TERMINAL_RADIO_TRANSMITTER 0x0711
373 #define AUDIO_TERMINAL_MULTI_TRACK_RECORDER 0x0712
374 #define AUDIO_TERMINAL_SYNTHESIZER 0x0713
375
376
377 #endif /* __AUDIO_H__ */