Base station firmware

Committer:
Perijah
Date:
Tue May 24 13:16:55 2016 +0000
Revision:
0:ecc3925d3f8c
Base station firmware

Who changed what in which revision?

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