?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 32

Line No. Rev Author Line
1 32 kaklik /*******************************************************************************
2 File Information:
3 FileName: usb_function_audio.h
4 Dependencies: See INCLUDES section
5 Processor: PIC18 or PIC24 USB Microcontrollers
6 Hardware: The code is natively intended to be used on the following
7 hardware platforms: PICDEM™ FS USB Demo Board,
8 PIC18F87J50 FS USB Plug-In Module, or
9 Explorer 16 + PIC24 USB PIM. The firmware may be
10 modified for use on other USB platforms by editing the
11 HardwareProfile.h file.
12 Complier: Microchip C18 (for PIC18) or C30 (for PIC24)
13 Company: Microchip Technology, Inc.
14  
15 Software License Agreement:
16  
17 The software supplied herewith by Microchip Technology Incorporated
18 (the “Company”) for its PIC® Microcontroller is intended and
19 supplied to you, the Company’s customer, for use solely and
20 exclusively on Microchip PIC Microcontroller products. The
21 software is owned by the Company and/or its supplier, and is
22 protected under applicable copyright laws. All rights are reserved.
23 Any use in violation of the foregoing restrictions may subject the
24 user to criminal sanctions under applicable laws, as well as to
25 civil liability for the breach of the terms and conditions of this
26 license.
27  
28 THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
29 WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
30 TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
31 PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
32 IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
33 CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
34  
35 Summary:
36 This file contains all of functions, macros, definitions, variables,
37 datatypes, etc. that are required for usage with the AUDIO function
38 driver. This file should be included in projects that use the Audio
39 \function driver. This file should also be included into the
40 usb_descriptors.c file and any other user file that requires access to the
41 HID interface.
42  
43  
44  
45 This file is located in the "\<Install Directory\>\\Microchip\\Include\\USB"
46 directory.
47  
48 Description:
49 USB AUDIO Function Driver File
50  
51 This file contains all of functions, macros, definitions, variables,
52 datatypes, etc. that are required for usage with the AUDIO function
53 driver. This file should be included in projects that use the AUDIO
54 \function driver. This file should also be included into the
55 usb_descriptors.c file and any other user file that requires access to the
56 AUDIO interface.
57  
58 This file is located in the "\<Install Directory\>\\Microchip\\Include\\USB"
59 directory.
60  
61 When including this file in a new project, this file can either be
62 referenced from the directory in which it was installed or copied
63 directly into the user application folder. If the first method is
64 chosen to keep the file located in the folder in which it is installed
65 then include paths need to be added so that the library and the
66 application both know where to reference each others files. If the
67 application folder is located in the same folder as the Microchip
68 folder (like the current demo folders), then the following include
69 paths need to be added to the application's project:
70  
71 .
72  
73 ..\\..\\Microchip\\Include
74  
75 If a different directory structure is used, modify the paths as
76 required. An example using absolute paths instead of relative paths
77 would be the following:
78  
79 C:\\Microchip Solutions\\Microchip\\Include
80  
81 C:\\Microchip Solutions\\My Demo Application
82 *******************************************************************/
83  
84 /********************************************************************
85 Change History:
86 Rev Description
87 ---- -----------
88 2.6 Initial Release
89 2.6a- No Change
90 2.7a
91 ********************************************************************/
92  
93 #ifndef AUDIO_H
94 #define AUDIO_H
95  
96 /** I N C L U D E S *******************************************************/
97  
98  
99 /** DEFINITIONS ****************************************************/
100 /******Audio Interface Class Code**********/
101 #define AUDIO_DEVICE 0x01
102  
103 /******* Audio Interface Subclass Codes**********/
104 #define AUDIOCONTROL 0x01
105 #define AUDIOSTREAMING 0x02
106 #define MIDISTREAMING 0x03
107  
108 /******* Audio Class-Specific Descriptor Types**********/
109 #define CS_UNDEFINED 0x20
110 #define CS_DEVICE 0x21
111 #define CS_CONFIGURATION 0x22
112 #define CS_STRING 0x23
113 #define CS_INTERFACE 0x24
114 #define CS_ENDPOINT 0x25
115  
116 /******* Audio Class-Specific AC Interface Descriptor Subtypes**********/
117 #define AC_DESCRIPTOR_UNDEFINED 0x00
118 #define HEADER 0x01
119 #define INPUT_TERMINAL 0x02
120 #define OUTPUT_TERMINAL 0x03
121 #define MIXER_UNIT 0x04
122 #define SELECTOR_UNIT 0x05
123 #define FEATURE_UNIT 0x06
124 #define PROCESSING_UNIT 0x07
125 #define EXTENSION_UNIT 0x08
126  
127 /******* Audio Class-Specific AS Interface Descriptor Subtypes**********/
128 #define AS_DESCRIPTOR_UNDEFINED 0x00
129 #define AS_GENERAL 0x01
130 #define FORMAT_TYPE 0x02
131 #define FORMAT_SPECIFIC 0x03
132  
133 /******* Processing Unit Process Types **********/
134 #define PROCESS_UNDEFINED 0x00
135 #define UP_DOWNMIX_PROCESS 0x01
136 #define DOLBY_PROLOGIC_PROCESS 0x02
137 #define THREE_D_STEREO_EXTENDER_PROCESS 0x03
138 #define REVERBERATION_PROCESS 0x04
139 #define CHORUS_PROCESS 0x05
140 #define DYN_RANGE_COMP_PROCESS 0x06
141  
142 /******* Audio Class-Specific Endpoint Descriptor Subtypes**********/
143 #define DESCRIPTOR_UNDEFINED 0x00
144 #define EP_GENERAL 0x01
145  
146 /****** Audio Class-Specific Request Codes ************/
147 #define REQUEST_CODE_UNDEFINED 0x00
148 #define SET_CUR 0x01
149 #define SET_MIN 0x02
150 #define SET_MAX 0x03
151 #define SET_RES 0x04
152 #define SET_MEM 0x05
153 #define GET_CUR 0x81
154 #define GET_MIN 0x82
155 #define GET_MAX 0x83
156 #define GET_RES 0x84
157 #define GET_MEM 0x85
158 #define GET_STAT 0xFF
159  
160 /************ Terminal Control Selectors ******/
161 #define TE_CONTROL_UNDEFINED 0x00
162 #define COPY_PROTECT_CONTROL 0x01
163  
164 /************ Feature Unit Control Selectors ****/
165 #define FU_CONTROL_UNDEFINED 0x00
166 #define MUTE_CONTROL 0x01
167 #define VOLUME_CONTROL 0x02
168 #define BASS_CONTROL 0x03
169 #define MID_CONTROL 0x04
170 #define TREBLE_CONTROL 0x05
171 #define GRAPHIC_EQUALIZER_CONTROL 0x06
172 #define AUTOMATIC_GAIN_CONTROL 0x07
173 #define DELAY_CONTROL 0x08
174 #define BASS_BOOST_CONTROL 0x09
175 #define LOUDNESS_CONTROL 0x0A
176  
177  
178 /************ Processing Unit Control Selectors ****/
179 /* Up/Down-mix Processing Unit Control Selectors */
180  
181 #define UD_CONTROL_UNDEFINED 0x00
182 #define UD_ENABLE_CONTROL 0x01
183 #define UD_MODE_SELECT_CONTROL 0x02
184  
185 /* Dolby Prologic(TM) Processing Unit Control Selectors */
186 #define DP_CONTROL_UNDEFINED 0x00
187 #define DP_ENABLE_CONTROL 0x01
188 #define DP_MODE_SELECT_CONTROL 0x02
189  
190 /* Stereo Extender Processing Unit Control Selectors */
191 #define THREE_D_CONTROL_UNDEFINED 0x00
192 #define THREE_D_ENABLE_CONTROL 0x01
193 #define SPACIOUSNESS_CONTROL 0x03
194  
195 /* Reverberation Processing Unit Control Selectors */
196 #define RV_CONTROL_UNDEFINED 0x00
197 #define RV_ENABLE_CONTROL 0x01
198 #define REVERB_LEVEL_CONTROL 0x02
199 #define REVERB_TIME_CONTROL 0x03
200 #define REVERB_FEEDBACK_CONTROL 0x04
201  
202 /* Chorus Processing Unit Control Selectors */
203 #define CH_CONTROL_UNDEFINED 0x00
204 #define CH_ENABLE_CONTROL 0x01
205 #define CHORUS_LEVEL_CONTROL 0x02
206 #define CHORUS_RATE_CONTROL 0x03
207 #define CHORUS_DEPTH_CONTROL 0x04
208  
209 /* Dynamic Range Compressor Processing Unit Control Selectors */
210 #define DR_CONTROL_UNDEFINED 0x00
211 #define DR_ENABLE_CONTROL 0x01
212 #define COMPRESSION_RATE_CONTROL 0x02
213 #define MAXAMPL_CONTROL 0x03
214 #define THRESHOLD_CONTROL 0x04
215 #define ATTACK_TIME 0x05
216 #define RELEASE_TIME 0x06
217  
218  
219 /************ Extension Unit Control Selectors **********/
220 #define XU_CONTROL_UNDEFINED 0x00
221 #define XU_ENABLE_CONTROL 0x01
222  
223 /************ Endpoint Control Selectors **********/
224 #define EP_CONTROL_UNDEFINED 0x00
225 #define SAMPLING_FREQ_CONTROL 0x01
226 #define PITCH_CONTROL 0x02
227  
228 /*********** Terminal Types***********************/
229 /*A complete list of Terminal Type codes is provided in
230 the document USB Audio Terminal Types */
231 #define USB_STREAMING 0x01, 0x01
232 #define MICROPHONE 0x01,0x02
233 #define SPEAKER 0x01,0x03
234 #define HEADPHONES 0x02,0x03
235  
236  
237 /** E X T E R N S ************************************************************/
238 extern USB_HANDLE lastTransmission;
239 extern volatile CTRL_TRF_SETUP SetupPkt;
240 extern ROM BYTE configDescriptor1[];
241 extern volatile BYTE CtrlTrfData[USB_EP0_BUFF_SIZE];
242  
243  
244  
245 /** Section: PUBLIC PROTOTYPES **********************************************/
246 void USBCheckAudioRequest(void);
247 #endif //AUDIO_H
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3