![](/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.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_H |
jeffknaggs | 0:865d42c46692 | 20 | #define USBAudio_H |
jeffknaggs | 0:865d42c46692 | 21 | |
jeffknaggs | 0:865d42c46692 | 22 | /* These headers are included for child class. */ |
jeffknaggs | 0:865d42c46692 | 23 | #include "USBEndpoints.h" |
jeffknaggs | 0:865d42c46692 | 24 | #include "USBDescriptor.h" |
jeffknaggs | 0:865d42c46692 | 25 | #include "USBDevice_Types.h" |
jeffknaggs | 0:865d42c46692 | 26 | |
jeffknaggs | 0:865d42c46692 | 27 | #include "USBDevice.h" |
jeffknaggs | 0:865d42c46692 | 28 | |
jeffknaggs | 0:865d42c46692 | 29 | |
jeffknaggs | 0:865d42c46692 | 30 | /** |
jeffknaggs | 0:865d42c46692 | 31 | * USBAudio example |
jeffknaggs | 0:865d42c46692 | 32 | * |
jeffknaggs | 0:865d42c46692 | 33 | * @code |
jeffknaggs | 0:865d42c46692 | 34 | * #include "mbed.h" |
jeffknaggs | 0:865d42c46692 | 35 | * #include "USBAudio.h" |
jeffknaggs | 0:865d42c46692 | 36 | * |
jeffknaggs | 0:865d42c46692 | 37 | * Serial pc(USBTX, USBRX); |
jeffknaggs | 0:865d42c46692 | 38 | * |
jeffknaggs | 0:865d42c46692 | 39 | * // frequency: 48 kHz |
jeffknaggs | 0:865d42c46692 | 40 | * #define FREQ 48000 |
jeffknaggs | 0:865d42c46692 | 41 | * |
jeffknaggs | 0:865d42c46692 | 42 | * // 1 channel: mono |
jeffknaggs | 0:865d42c46692 | 43 | * #define NB_CHA 1 |
jeffknaggs | 0:865d42c46692 | 44 | * |
jeffknaggs | 0:865d42c46692 | 45 | * // length of an audio packet: each ms, we receive 48 * 16bits ->48 * 2 bytes. as there is one channel, the length will be 48 * 2 * 1 |
jeffknaggs | 0:865d42c46692 | 46 | * #define AUDIO_LENGTH_PACKET 48 * 2 * 1 |
jeffknaggs | 0:865d42c46692 | 47 | * |
jeffknaggs | 0:865d42c46692 | 48 | * // USBAudio |
jeffknaggs | 0:865d42c46692 | 49 | * USBAudio audio(FREQ, NB_CHA); |
jeffknaggs | 0:865d42c46692 | 50 | * |
jeffknaggs | 0:865d42c46692 | 51 | * int main() { |
jeffknaggs | 0:865d42c46692 | 52 | * int16_t buf[AUDIO_LENGTH_PACKET/2]; |
jeffknaggs | 0:865d42c46692 | 53 | * |
jeffknaggs | 0:865d42c46692 | 54 | * while (1) { |
jeffknaggs | 0:865d42c46692 | 55 | * // read an audio packet |
jeffknaggs | 0:865d42c46692 | 56 | * audio.read((uint8_t *)buf); |
jeffknaggs | 0:865d42c46692 | 57 | * |
jeffknaggs | 0:865d42c46692 | 58 | * |
jeffknaggs | 0:865d42c46692 | 59 | * // print packet received |
jeffknaggs | 0:865d42c46692 | 60 | * pc.printf("recv: "); |
jeffknaggs | 0:865d42c46692 | 61 | * for(int i = 0; i < AUDIO_LENGTH_PACKET/2; i++) { |
jeffknaggs | 0:865d42c46692 | 62 | * pc.printf("%d ", buf[i]); |
jeffknaggs | 0:865d42c46692 | 63 | * } |
jeffknaggs | 0:865d42c46692 | 64 | * pc.printf("\r\n"); |
jeffknaggs | 0:865d42c46692 | 65 | * } |
jeffknaggs | 0:865d42c46692 | 66 | * } |
jeffknaggs | 0:865d42c46692 | 67 | * @endcode |
jeffknaggs | 0:865d42c46692 | 68 | */ |
jeffknaggs | 0:865d42c46692 | 69 | class USBAudio: public USBDevice { |
jeffknaggs | 0:865d42c46692 | 70 | public: |
jeffknaggs | 0:865d42c46692 | 71 | |
jeffknaggs | 0:865d42c46692 | 72 | /** |
jeffknaggs | 0:865d42c46692 | 73 | * Constructor |
jeffknaggs | 0:865d42c46692 | 74 | * |
jeffknaggs | 0:865d42c46692 | 75 | * @param frequency_in frequency in Hz (default: 48000) |
jeffknaggs | 0:865d42c46692 | 76 | * @param channel_nb_in channel number (1 or 2) (default: 1) |
jeffknaggs | 0:865d42c46692 | 77 | * @param frequency_out frequency in Hz (default: 8000) |
jeffknaggs | 0:865d42c46692 | 78 | * @param channel_nb_out_in channel number (1 or 2) (default: 1) |
jeffknaggs | 0:865d42c46692 | 79 | * @param vendor_id Your vendor_id |
jeffknaggs | 0:865d42c46692 | 80 | * @param product_id Your product_id |
jeffknaggs | 0:865d42c46692 | 81 | * @param product_release Your preoduct_release |
jeffknaggs | 0:865d42c46692 | 82 | */ |
jeffknaggs | 0:865d42c46692 | 83 | USBAudio(uint32_t frequency_in = 48000, uint8_t channel_nb_in = 1, uint32_t frequency_out = 8000, uint8_t channel_nb_out = 1, uint16_t vendor_id = 0x7bb8, uint16_t product_id = 0x1111, uint16_t product_release = 0x0100); |
jeffknaggs | 0:865d42c46692 | 84 | |
jeffknaggs | 0:865d42c46692 | 85 | /** |
jeffknaggs | 0:865d42c46692 | 86 | * Get current volume between 0.0 and 1.0 |
jeffknaggs | 0:865d42c46692 | 87 | * |
jeffknaggs | 0:865d42c46692 | 88 | * @returns volume |
jeffknaggs | 0:865d42c46692 | 89 | */ |
jeffknaggs | 0:865d42c46692 | 90 | float getVolume(); |
jeffknaggs | 0:865d42c46692 | 91 | |
jeffknaggs | 0:865d42c46692 | 92 | /** |
jeffknaggs | 0:865d42c46692 | 93 | * Read an audio packet. During a frame, only a single reading (you can't write and read an audio packet during the same frame)can be done using this method. Warning: Blocking |
jeffknaggs | 0:865d42c46692 | 94 | * |
jeffknaggs | 0:865d42c46692 | 95 | * @param buf pointer on a buffer which will be filled with an audio packet |
jeffknaggs | 0:865d42c46692 | 96 | * |
jeffknaggs | 0:865d42c46692 | 97 | * @returns true if successfull |
jeffknaggs | 0:865d42c46692 | 98 | */ |
jeffknaggs | 0:865d42c46692 | 99 | bool read(uint8_t * buf); |
jeffknaggs | 0:865d42c46692 | 100 | |
jeffknaggs | 0:865d42c46692 | 101 | /** |
jeffknaggs | 0:865d42c46692 | 102 | * Try to read an audio packet. During a frame, only a single reading (you can't write and read an audio packet during the same frame)can be done using this method. Warning: Non Blocking |
jeffknaggs | 0:865d42c46692 | 103 | * |
jeffknaggs | 0:865d42c46692 | 104 | * @param buf pointer on a buffer which will be filled if an audio packet is available |
jeffknaggs | 0:865d42c46692 | 105 | * |
jeffknaggs | 0:865d42c46692 | 106 | * @returns true if successfull |
jeffknaggs | 0:865d42c46692 | 107 | */ |
jeffknaggs | 0:865d42c46692 | 108 | bool readNB(uint8_t * buf); |
jeffknaggs | 0:865d42c46692 | 109 | |
jeffknaggs | 0:865d42c46692 | 110 | /** |
jeffknaggs | 0:865d42c46692 | 111 | * Write an audio packet. During a frame, only a single writing (you can't write and read an audio packet during the same frame)can be done using this method. |
jeffknaggs | 0:865d42c46692 | 112 | * |
jeffknaggs | 0:865d42c46692 | 113 | * @param buf pointer on the audio packet which will be sent |
jeffknaggs | 0:865d42c46692 | 114 | * @returns true if successful |
jeffknaggs | 0:865d42c46692 | 115 | */ |
jeffknaggs | 0:865d42c46692 | 116 | bool write(uint8_t * buf); |
jeffknaggs | 0:865d42c46692 | 117 | |
jeffknaggs | 0:865d42c46692 | 118 | /** |
jeffknaggs | 0:865d42c46692 | 119 | * Write and read an audio packet at the same time (on the same frame) |
jeffknaggs | 0:865d42c46692 | 120 | * |
jeffknaggs | 0:865d42c46692 | 121 | * @param buf_read pointer on a buffer which will be filled with an audio packet |
jeffknaggs | 0:865d42c46692 | 122 | * @param buf_write pointer on the audio packet which will be sent |
jeffknaggs | 0:865d42c46692 | 123 | * @returns true if successful |
jeffknaggs | 0:865d42c46692 | 124 | */ |
jeffknaggs | 0:865d42c46692 | 125 | bool readWrite(uint8_t * buf_read, uint8_t * buf_write); |
jeffknaggs | 0:865d42c46692 | 126 | |
jeffknaggs | 0:865d42c46692 | 127 | |
jeffknaggs | 0:865d42c46692 | 128 | /** attach a handler to update the volume |
jeffknaggs | 0:865d42c46692 | 129 | * |
jeffknaggs | 0:865d42c46692 | 130 | * @param function Function to attach |
jeffknaggs | 0:865d42c46692 | 131 | * |
jeffknaggs | 0:865d42c46692 | 132 | */ |
jeffknaggs | 0:865d42c46692 | 133 | void attach(void(*fptr)(void)) { |
jeffknaggs | 0:865d42c46692 | 134 | updateVol.attach(fptr); |
jeffknaggs | 0:865d42c46692 | 135 | } |
jeffknaggs | 0:865d42c46692 | 136 | |
jeffknaggs | 0:865d42c46692 | 137 | /** Attach a nonstatic void/void member function to update the volume |
jeffknaggs | 0:865d42c46692 | 138 | * |
jeffknaggs | 0:865d42c46692 | 139 | * @param tptr Object pointer |
jeffknaggs | 0:865d42c46692 | 140 | * @param mptr Member function pointer |
jeffknaggs | 0:865d42c46692 | 141 | * |
jeffknaggs | 0:865d42c46692 | 142 | */ |
jeffknaggs | 0:865d42c46692 | 143 | template<typename T> |
jeffknaggs | 0:865d42c46692 | 144 | void attach(T *tptr, void(T::*mptr)(void)) { |
jeffknaggs | 0:865d42c46692 | 145 | updateVol.attach(tptr, mptr); |
jeffknaggs | 0:865d42c46692 | 146 | } |
jeffknaggs | 0:865d42c46692 | 147 | |
jeffknaggs | 0:865d42c46692 | 148 | |
jeffknaggs | 0:865d42c46692 | 149 | protected: |
jeffknaggs | 0:865d42c46692 | 150 | |
jeffknaggs | 0:865d42c46692 | 151 | /* |
jeffknaggs | 0:865d42c46692 | 152 | * Called by USBDevice layer. Set configuration of the device. |
jeffknaggs | 0:865d42c46692 | 153 | * For instance, you can add all endpoints that you need on this function. |
jeffknaggs | 0:865d42c46692 | 154 | * |
jeffknaggs | 0:865d42c46692 | 155 | * @param configuration Number of the configuration |
jeffknaggs | 0:865d42c46692 | 156 | * @returns true if class handles this request |
jeffknaggs | 0:865d42c46692 | 157 | */ |
jeffknaggs | 0:865d42c46692 | 158 | virtual bool USBCallback_setConfiguration(uint8_t configuration); |
jeffknaggs | 0:865d42c46692 | 159 | |
jeffknaggs | 0:865d42c46692 | 160 | /* |
jeffknaggs | 0:865d42c46692 | 161 | * Called by USBDevice on Endpoint0 request. Warning: Called in ISR context |
jeffknaggs | 0:865d42c46692 | 162 | * This is used to handle extensions to standard requests |
jeffknaggs | 0:865d42c46692 | 163 | * and class specific requests |
jeffknaggs | 0:865d42c46692 | 164 | * |
jeffknaggs | 0:865d42c46692 | 165 | * @returns true if class handles this request |
jeffknaggs | 0:865d42c46692 | 166 | */ |
jeffknaggs | 0:865d42c46692 | 167 | virtual bool USBCallback_request(); |
jeffknaggs | 0:865d42c46692 | 168 | |
jeffknaggs | 0:865d42c46692 | 169 | /* |
jeffknaggs | 0:865d42c46692 | 170 | * Get string product descriptor |
jeffknaggs | 0:865d42c46692 | 171 | * |
jeffknaggs | 0:865d42c46692 | 172 | * @returns pointer to the string product descriptor |
jeffknaggs | 0:865d42c46692 | 173 | */ |
jeffknaggs | 0:865d42c46692 | 174 | virtual uint8_t * stringIproductDesc(); |
jeffknaggs | 0:865d42c46692 | 175 | |
jeffknaggs | 0:865d42c46692 | 176 | /* |
jeffknaggs | 0:865d42c46692 | 177 | * Get string interface descriptor |
jeffknaggs | 0:865d42c46692 | 178 | * |
jeffknaggs | 0:865d42c46692 | 179 | * @returns pointer to the string interface descriptor |
jeffknaggs | 0:865d42c46692 | 180 | */ |
jeffknaggs | 0:865d42c46692 | 181 | virtual uint8_t * stringIinterfaceDesc(); |
jeffknaggs | 0:865d42c46692 | 182 | |
jeffknaggs | 0:865d42c46692 | 183 | /* |
jeffknaggs | 0:865d42c46692 | 184 | * Get configuration descriptor |
jeffknaggs | 0:865d42c46692 | 185 | * |
jeffknaggs | 0:865d42c46692 | 186 | * @returns pointer to the configuration descriptor |
jeffknaggs | 0:865d42c46692 | 187 | */ |
jeffknaggs | 0:865d42c46692 | 188 | virtual uint8_t * configurationDesc(); |
jeffknaggs | 0:865d42c46692 | 189 | |
jeffknaggs | 0:865d42c46692 | 190 | /* |
jeffknaggs | 0:865d42c46692 | 191 | * Called by USBDevice layer. Set interface/alternate of the device. |
jeffknaggs | 0:865d42c46692 | 192 | * |
jeffknaggs | 0:865d42c46692 | 193 | * @param interface Number of the interface to be configured |
jeffknaggs | 0:865d42c46692 | 194 | * @param alternate Number of the alternate to be configured |
jeffknaggs | 0:865d42c46692 | 195 | * @returns true if class handles this request |
jeffknaggs | 0:865d42c46692 | 196 | */ |
jeffknaggs | 0:865d42c46692 | 197 | virtual bool USBCallback_setInterface(uint16_t interface, uint8_t alternate); |
jeffknaggs | 0:865d42c46692 | 198 | |
jeffknaggs | 0:865d42c46692 | 199 | /* |
jeffknaggs | 0:865d42c46692 | 200 | * Called by USBDevice on Endpoint0 request completion |
jeffknaggs | 0:865d42c46692 | 201 | * if the 'notify' flag has been set to true. Warning: Called in ISR context |
jeffknaggs | 0:865d42c46692 | 202 | * |
jeffknaggs | 0:865d42c46692 | 203 | * In this case it is used to indicate that a HID report has |
jeffknaggs | 0:865d42c46692 | 204 | * been received from the host on endpoint 0 |
jeffknaggs | 0:865d42c46692 | 205 | * |
jeffknaggs | 0:865d42c46692 | 206 | * @param buf buffer received on endpoint 0 |
jeffknaggs | 0:865d42c46692 | 207 | * @param length length of this buffer |
jeffknaggs | 0:865d42c46692 | 208 | */ |
jeffknaggs | 0:865d42c46692 | 209 | virtual void USBCallback_requestCompleted(uint8_t * buf, uint32_t length); |
jeffknaggs | 0:865d42c46692 | 210 | |
jeffknaggs | 0:865d42c46692 | 211 | /* |
jeffknaggs | 0:865d42c46692 | 212 | * Callback called on each Start of Frame event |
jeffknaggs | 0:865d42c46692 | 213 | */ |
jeffknaggs | 0:865d42c46692 | 214 | virtual void SOF(int frameNumber); |
jeffknaggs | 0:865d42c46692 | 215 | |
jeffknaggs | 0:865d42c46692 | 216 | /* |
jeffknaggs | 0:865d42c46692 | 217 | * Callback called when a packet is received |
jeffknaggs | 0:865d42c46692 | 218 | */ |
jeffknaggs | 0:865d42c46692 | 219 | virtual bool EP3_OUT_callback(); |
jeffknaggs | 0:865d42c46692 | 220 | |
jeffknaggs | 0:865d42c46692 | 221 | /* |
jeffknaggs | 0:865d42c46692 | 222 | * Callback called when a packet has been sent |
jeffknaggs | 0:865d42c46692 | 223 | */ |
jeffknaggs | 0:865d42c46692 | 224 | virtual bool EP3_IN_callback(); |
jeffknaggs | 0:865d42c46692 | 225 | |
jeffknaggs | 0:865d42c46692 | 226 | private: |
jeffknaggs | 0:865d42c46692 | 227 | |
jeffknaggs | 0:865d42c46692 | 228 | // stream available ? |
jeffknaggs | 0:865d42c46692 | 229 | volatile bool available; |
jeffknaggs | 0:865d42c46692 | 230 | |
jeffknaggs | 0:865d42c46692 | 231 | // interrupt OUT has been received |
jeffknaggs | 0:865d42c46692 | 232 | volatile bool interruptOUT; |
jeffknaggs | 0:865d42c46692 | 233 | |
jeffknaggs | 0:865d42c46692 | 234 | // interrupt IN has been received |
jeffknaggs | 0:865d42c46692 | 235 | volatile bool interruptIN; |
jeffknaggs | 0:865d42c46692 | 236 | |
jeffknaggs | 0:865d42c46692 | 237 | // audio packet has been written |
jeffknaggs | 0:865d42c46692 | 238 | volatile bool writeIN; |
jeffknaggs | 0:865d42c46692 | 239 | |
jeffknaggs | 0:865d42c46692 | 240 | // FREQ |
jeffknaggs | 0:865d42c46692 | 241 | uint32_t FREQ_OUT; |
jeffknaggs | 0:865d42c46692 | 242 | uint32_t FREQ_IN; |
jeffknaggs | 0:865d42c46692 | 243 | |
jeffknaggs | 0:865d42c46692 | 244 | // size of the maximum packet for the isochronous endpoint |
jeffknaggs | 0:865d42c46692 | 245 | uint32_t PACKET_SIZE_ISO_IN; |
jeffknaggs | 0:865d42c46692 | 246 | uint32_t PACKET_SIZE_ISO_OUT; |
jeffknaggs | 0:865d42c46692 | 247 | |
jeffknaggs | 0:865d42c46692 | 248 | // mono, stereo,... |
jeffknaggs | 0:865d42c46692 | 249 | uint8_t channel_nb_in; |
jeffknaggs | 0:865d42c46692 | 250 | uint8_t channel_nb_out; |
jeffknaggs | 0:865d42c46692 | 251 | |
jeffknaggs | 0:865d42c46692 | 252 | // channel config: master, left, right |
jeffknaggs | 0:865d42c46692 | 253 | uint8_t channel_config_in; |
jeffknaggs | 0:865d42c46692 | 254 | uint8_t channel_config_out; |
jeffknaggs | 0:865d42c46692 | 255 | |
jeffknaggs | 0:865d42c46692 | 256 | // mute state |
jeffknaggs | 0:865d42c46692 | 257 | uint8_t mute; |
jeffknaggs | 0:865d42c46692 | 258 | |
jeffknaggs | 0:865d42c46692 | 259 | // Volume Current Value |
jeffknaggs | 0:865d42c46692 | 260 | uint16_t volCur; |
jeffknaggs | 0:865d42c46692 | 261 | |
jeffknaggs | 0:865d42c46692 | 262 | // Volume Minimum Value |
jeffknaggs | 0:865d42c46692 | 263 | uint16_t volMin; |
jeffknaggs | 0:865d42c46692 | 264 | |
jeffknaggs | 0:865d42c46692 | 265 | // Volume Maximum Value |
jeffknaggs | 0:865d42c46692 | 266 | uint16_t volMax; |
jeffknaggs | 0:865d42c46692 | 267 | |
jeffknaggs | 0:865d42c46692 | 268 | // Volume Resolution |
jeffknaggs | 0:865d42c46692 | 269 | uint16_t volRes; |
jeffknaggs | 0:865d42c46692 | 270 | |
jeffknaggs | 0:865d42c46692 | 271 | // Buffer containing one audio packet (to be read) |
jeffknaggs | 0:865d42c46692 | 272 | volatile uint8_t * buf_stream_in; |
jeffknaggs | 0:865d42c46692 | 273 | |
jeffknaggs | 0:865d42c46692 | 274 | // Buffer containing one audio packet (to be written) |
jeffknaggs | 0:865d42c46692 | 275 | volatile uint8_t * buf_stream_out; |
jeffknaggs | 0:865d42c46692 | 276 | |
jeffknaggs | 0:865d42c46692 | 277 | // callback to update volume |
jeffknaggs | 0:865d42c46692 | 278 | FunctionPointer updateVol; |
jeffknaggs | 0:865d42c46692 | 279 | |
jeffknaggs | 0:865d42c46692 | 280 | // boolean showing that the SOF handler has been called. Useful for readNB. |
jeffknaggs | 0:865d42c46692 | 281 | volatile bool SOF_handler; |
jeffknaggs | 0:865d42c46692 | 282 | |
jeffknaggs | 0:865d42c46692 | 283 | volatile float volume; |
jeffknaggs | 0:865d42c46692 | 284 | |
jeffknaggs | 0:865d42c46692 | 285 | }; |
jeffknaggs | 0:865d42c46692 | 286 | |
jeffknaggs | 0:865d42c46692 | 287 | #endif |