Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
USBAudio_Types.h
00001 /* Copyright (c) 2010-2011 mbed.org, MIT License 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 00004 * and associated documentation files (the "Software"), to deal in the Software without 00005 * restriction, including without limitation the rights to use, copy, modify, merge, publish, 00006 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 00007 * Software is furnished to do so, subject to the following conditions: 00008 * 00009 * The above copyright notice and this permission notice shall be included in all copies or 00010 * substantial portions of the Software. 00011 * 00012 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 00013 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00014 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00015 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00016 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00017 */ 00018 00019 #ifndef USBAUDIO_TYPES_H 00020 #define USBAUDIO_TYPES_H 00021 00022 00023 #define DEFAULT_CONFIGURATION (1) 00024 00025 // Audio Request Codes 00026 #define REQUEST_SET_CUR 0x01 00027 #define REQUEST_GET_CUR 0x81 00028 #define REQUEST_SET_MIN 0x02 00029 #define REQUEST_GET_MIN 0x82 00030 #define REQUEST_SET_MAX 0x03 00031 #define REQUEST_GET_MAX 0x83 00032 #define REQUEST_SET_RES 0x04 00033 #define REQUEST_GET_RES 0x84 00034 00035 #define MUTE_CONTROL 0x01 00036 #define VOLUME_CONTROL 0x02 00037 00038 00039 // Audio Descriptor Sizes 00040 #define CONTROL_INTERFACE_DESCRIPTOR_LENGTH 0x09 00041 #define STREAMING_INTERFACE_DESCRIPTOR_LENGTH 0x07 00042 #define INPUT_TERMINAL_DESCRIPTOR_LENGTH 0x0C 00043 #define OUTPUT_TERMINAL_DESCRIPTOR_LENGTH 0x09 00044 #define FEATURE_UNIT_DESCRIPTOR_LENGTH 0x09 00045 #define STREAMING_ENDPOINT_DESCRIPTOR_LENGTH 0x07 00046 00047 // Audio Format Type Descriptor Sizes 00048 #define FORMAT_TYPE_I_DESCRIPTOR_LENGTH 0x0b 00049 00050 #define AUDIO_CLASS 0x01 00051 #define SUBCLASS_AUDIOCONTROL 0x01 00052 #define SUBCLASS_AUDIOSTREAMING 0x02 00053 00054 // Audio Descriptor Types 00055 #define INTERFACE_DESCRIPTOR_TYPE 0x24 00056 #define ENDPOINT_DESCRIPTOR_TYPE 0x25 00057 00058 // Audio Control Interface Descriptor Subtypes 00059 #define CONTROL_HEADER 0x01 00060 #define CONTROL_INPUT_TERMINAL 0x02 00061 #define CONTROL_OUTPUT_TERMINAL 0x03 00062 #define CONTROL_FEATURE_UNIT 0x06 00063 00064 // USB Terminal Types 00065 #define TERMINAL_USB_STREAMING 0x0101 00066 00067 // Predefined Audio Channel Configuration Bits 00068 // Mono 00069 #define CHANNEL_M 0x0000 00070 #define CHANNEL_L 0x0001 /* Left Front */ 00071 #define CHANNEL_R 0x0002 /* Right Front */ 00072 00073 // Feature Unit Control Bits 00074 #define CONTROL_MUTE 0x0001 00075 #define CONTROL_VOLUME 0x0002 00076 00077 // Input Terminal Types 00078 #define TERMINAL_MICROPHONE 0x0201 00079 00080 // Output Terminal Types 00081 #define TERMINAL_SPEAKER 0x0301 00082 #define TERMINAL_HEADPHONES 0x0302 00083 00084 // Audio Streaming Interface Descriptor Subtypes 00085 #define STREAMING_GENERAL 0x01 00086 #define STREAMING_FORMAT_TYPE 0x02 00087 00088 // Audio Data Format Type I Codes 00089 #define FORMAT_PCM 0x0001 00090 00091 // Audio Format Types 00092 #define FORMAT_TYPE_I 0x01 00093 00094 // Audio Endpoint Descriptor Subtypes 00095 #define ENDPOINT_GENERAL 0x01 00096 00097 #endif
Generated on Sun Jul 17 2022 08:25:33 by 1.7.2