![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
The preloaded firmware shipped on the mBot.
Please use the version of this project/repo found at: http://developer.mbed.org/teams/Outrageous-Circuits/code/Official_mBot/
USBDevice/USBAudio/USBAudio_Types.h@0:865d42c46692, 2014-11-25 (annotated)
- Committer:
- jeffknaggs
- Date:
- Tue Nov 25 14:34:47 2014 +0000
- Revision:
- 0:865d42c46692
Initial commit.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jeffknaggs | 0:865d42c46692 | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
jeffknaggs | 0:865d42c46692 | 2 | * |
jeffknaggs | 0:865d42c46692 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
jeffknaggs | 0:865d42c46692 | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
jeffknaggs | 0:865d42c46692 | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
jeffknaggs | 0:865d42c46692 | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
jeffknaggs | 0:865d42c46692 | 7 | * Software is furnished to do so, subject to the following conditions: |
jeffknaggs | 0:865d42c46692 | 8 | * |
jeffknaggs | 0:865d42c46692 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
jeffknaggs | 0:865d42c46692 | 10 | * substantial portions of the Software. |
jeffknaggs | 0:865d42c46692 | 11 | * |
jeffknaggs | 0:865d42c46692 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
jeffknaggs | 0:865d42c46692 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
jeffknaggs | 0:865d42c46692 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
jeffknaggs | 0:865d42c46692 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
jeffknaggs | 0:865d42c46692 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
jeffknaggs | 0:865d42c46692 | 17 | */ |
jeffknaggs | 0:865d42c46692 | 18 | |
jeffknaggs | 0:865d42c46692 | 19 | #ifndef USBAUDIO_TYPES_H |
jeffknaggs | 0:865d42c46692 | 20 | #define USBAUDIO_TYPES_H |
jeffknaggs | 0:865d42c46692 | 21 | |
jeffknaggs | 0:865d42c46692 | 22 | |
jeffknaggs | 0:865d42c46692 | 23 | #define DEFAULT_CONFIGURATION (1) |
jeffknaggs | 0:865d42c46692 | 24 | |
jeffknaggs | 0:865d42c46692 | 25 | // Audio Request Codes |
jeffknaggs | 0:865d42c46692 | 26 | #define REQUEST_SET_CUR 0x01 |
jeffknaggs | 0:865d42c46692 | 27 | #define REQUEST_GET_CUR 0x81 |
jeffknaggs | 0:865d42c46692 | 28 | #define REQUEST_SET_MIN 0x02 |
jeffknaggs | 0:865d42c46692 | 29 | #define REQUEST_GET_MIN 0x82 |
jeffknaggs | 0:865d42c46692 | 30 | #define REQUEST_SET_MAX 0x03 |
jeffknaggs | 0:865d42c46692 | 31 | #define REQUEST_GET_MAX 0x83 |
jeffknaggs | 0:865d42c46692 | 32 | #define REQUEST_SET_RES 0x04 |
jeffknaggs | 0:865d42c46692 | 33 | #define REQUEST_GET_RES 0x84 |
jeffknaggs | 0:865d42c46692 | 34 | |
jeffknaggs | 0:865d42c46692 | 35 | #define MUTE_CONTROL 0x01 |
jeffknaggs | 0:865d42c46692 | 36 | #define VOLUME_CONTROL 0x02 |
jeffknaggs | 0:865d42c46692 | 37 | |
jeffknaggs | 0:865d42c46692 | 38 | |
jeffknaggs | 0:865d42c46692 | 39 | // Audio Descriptor Sizes |
jeffknaggs | 0:865d42c46692 | 40 | #define CONTROL_INTERFACE_DESCRIPTOR_LENGTH 0x09 |
jeffknaggs | 0:865d42c46692 | 41 | #define STREAMING_INTERFACE_DESCRIPTOR_LENGTH 0x07 |
jeffknaggs | 0:865d42c46692 | 42 | #define INPUT_TERMINAL_DESCRIPTOR_LENGTH 0x0C |
jeffknaggs | 0:865d42c46692 | 43 | #define OUTPUT_TERMINAL_DESCRIPTOR_LENGTH 0x09 |
jeffknaggs | 0:865d42c46692 | 44 | #define FEATURE_UNIT_DESCRIPTOR_LENGTH 0x09 |
jeffknaggs | 0:865d42c46692 | 45 | #define STREAMING_ENDPOINT_DESCRIPTOR_LENGTH 0x07 |
jeffknaggs | 0:865d42c46692 | 46 | |
jeffknaggs | 0:865d42c46692 | 47 | // Audio Format Type Descriptor Sizes |
jeffknaggs | 0:865d42c46692 | 48 | #define FORMAT_TYPE_I_DESCRIPTOR_LENGTH 0x0b |
jeffknaggs | 0:865d42c46692 | 49 | |
jeffknaggs | 0:865d42c46692 | 50 | #define AUDIO_CLASS 0x01 |
jeffknaggs | 0:865d42c46692 | 51 | #define SUBCLASS_AUDIOCONTROL 0x01 |
jeffknaggs | 0:865d42c46692 | 52 | #define SUBCLASS_AUDIOSTREAMING 0x02 |
jeffknaggs | 0:865d42c46692 | 53 | |
jeffknaggs | 0:865d42c46692 | 54 | // Audio Descriptor Types |
jeffknaggs | 0:865d42c46692 | 55 | #define INTERFACE_DESCRIPTOR_TYPE 0x24 |
jeffknaggs | 0:865d42c46692 | 56 | #define ENDPOINT_DESCRIPTOR_TYPE 0x25 |
jeffknaggs | 0:865d42c46692 | 57 | |
jeffknaggs | 0:865d42c46692 | 58 | // Audio Control Interface Descriptor Subtypes |
jeffknaggs | 0:865d42c46692 | 59 | #define CONTROL_HEADER 0x01 |
jeffknaggs | 0:865d42c46692 | 60 | #define CONTROL_INPUT_TERMINAL 0x02 |
jeffknaggs | 0:865d42c46692 | 61 | #define CONTROL_OUTPUT_TERMINAL 0x03 |
jeffknaggs | 0:865d42c46692 | 62 | #define CONTROL_FEATURE_UNIT 0x06 |
jeffknaggs | 0:865d42c46692 | 63 | |
jeffknaggs | 0:865d42c46692 | 64 | // USB Terminal Types |
jeffknaggs | 0:865d42c46692 | 65 | #define TERMINAL_USB_STREAMING 0x0101 |
jeffknaggs | 0:865d42c46692 | 66 | |
jeffknaggs | 0:865d42c46692 | 67 | // Predefined Audio Channel Configuration Bits |
jeffknaggs | 0:865d42c46692 | 68 | // Mono |
jeffknaggs | 0:865d42c46692 | 69 | #define CHANNEL_M 0x0000 |
jeffknaggs | 0:865d42c46692 | 70 | #define CHANNEL_L 0x0001 /* Left Front */ |
jeffknaggs | 0:865d42c46692 | 71 | #define CHANNEL_R 0x0002 /* Right Front */ |
jeffknaggs | 0:865d42c46692 | 72 | |
jeffknaggs | 0:865d42c46692 | 73 | // Feature Unit Control Bits |
jeffknaggs | 0:865d42c46692 | 74 | #define CONTROL_MUTE 0x0001 |
jeffknaggs | 0:865d42c46692 | 75 | #define CONTROL_VOLUME 0x0002 |
jeffknaggs | 0:865d42c46692 | 76 | |
jeffknaggs | 0:865d42c46692 | 77 | // Input Terminal Types |
jeffknaggs | 0:865d42c46692 | 78 | #define TERMINAL_MICROPHONE 0x0201 |
jeffknaggs | 0:865d42c46692 | 79 | |
jeffknaggs | 0:865d42c46692 | 80 | // Output Terminal Types |
jeffknaggs | 0:865d42c46692 | 81 | #define TERMINAL_SPEAKER 0x0301 |
jeffknaggs | 0:865d42c46692 | 82 | #define TERMINAL_HEADPHONES 0x0302 |
jeffknaggs | 0:865d42c46692 | 83 | |
jeffknaggs | 0:865d42c46692 | 84 | // Audio Streaming Interface Descriptor Subtypes |
jeffknaggs | 0:865d42c46692 | 85 | #define STREAMING_GENERAL 0x01 |
jeffknaggs | 0:865d42c46692 | 86 | #define STREAMING_FORMAT_TYPE 0x02 |
jeffknaggs | 0:865d42c46692 | 87 | |
jeffknaggs | 0:865d42c46692 | 88 | // Audio Data Format Type I Codes |
jeffknaggs | 0:865d42c46692 | 89 | #define FORMAT_PCM 0x0001 |
jeffknaggs | 0:865d42c46692 | 90 | |
jeffknaggs | 0:865d42c46692 | 91 | // Audio Format Types |
jeffknaggs | 0:865d42c46692 | 92 | #define FORMAT_TYPE_I 0x01 |
jeffknaggs | 0:865d42c46692 | 93 | |
jeffknaggs | 0:865d42c46692 | 94 | // Audio Endpoint Descriptor Subtypes |
jeffknaggs | 0:865d42c46692 | 95 | #define ENDPOINT_GENERAL 0x01 |
jeffknaggs | 0:865d42c46692 | 96 | |
jeffknaggs | 0:865d42c46692 | 97 | #endif |