Opencv 3.1 project on GR-PEACH board

Fork of gr-peach-opencv-project by the do

Committer:
thedo
Date:
Tue Jul 04 06:23:13 2017 +0000
Revision:
170:54ff26da7eb6
Parent:
166:3a9487d57a5c
project opencv 3.1 on GR PEACH board, no use SD card.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thedo 166:3a9487d57a5c 1 /* Copyright (c) 2014 mbed.org, MIT License
thedo 166:3a9487d57a5c 2 *
thedo 166:3a9487d57a5c 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
thedo 166:3a9487d57a5c 4 * and associated documentation files (the "Software"), to deal in the Software without
thedo 166:3a9487d57a5c 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
thedo 166:3a9487d57a5c 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
thedo 166:3a9487d57a5c 7 * Software is furnished to do so, subject to the following conditions:
thedo 166:3a9487d57a5c 8 *
thedo 166:3a9487d57a5c 9 * The above copyright notice and this permission notice shall be included in all copies or
thedo 166:3a9487d57a5c 10 * substantial portions of the Software.
thedo 166:3a9487d57a5c 11 *
thedo 166:3a9487d57a5c 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
thedo 166:3a9487d57a5c 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
thedo 166:3a9487d57a5c 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
thedo 166:3a9487d57a5c 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
thedo 166:3a9487d57a5c 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
thedo 166:3a9487d57a5c 17 */
thedo 166:3a9487d57a5c 18
thedo 166:3a9487d57a5c 19 #ifndef USBHOSTMIDI_H
thedo 166:3a9487d57a5c 20 #define USBHOSTMIDI_H
thedo 166:3a9487d57a5c 21
thedo 166:3a9487d57a5c 22 #include "USBHostConf.h"
thedo 166:3a9487d57a5c 23
thedo 166:3a9487d57a5c 24 #if USBHOST_MIDI
thedo 166:3a9487d57a5c 25
thedo 166:3a9487d57a5c 26 #include "USBHost.h"
thedo 166:3a9487d57a5c 27
thedo 166:3a9487d57a5c 28 /**
thedo 166:3a9487d57a5c 29 * A class to communicate a USB MIDI device
thedo 166:3a9487d57a5c 30 */
thedo 166:3a9487d57a5c 31 class USBHostMIDI : public IUSBEnumerator {
thedo 166:3a9487d57a5c 32 public:
thedo 166:3a9487d57a5c 33 /**
thedo 166:3a9487d57a5c 34 * Constructor
thedo 166:3a9487d57a5c 35 */
thedo 166:3a9487d57a5c 36 USBHostMIDI();
thedo 166:3a9487d57a5c 37
thedo 166:3a9487d57a5c 38 /**
thedo 166:3a9487d57a5c 39 * Check if a USB MIDI device is connected
thedo 166:3a9487d57a5c 40 *
thedo 166:3a9487d57a5c 41 * @returns true if a midi device is connected
thedo 166:3a9487d57a5c 42 */
thedo 166:3a9487d57a5c 43 bool connected();
thedo 166:3a9487d57a5c 44
thedo 166:3a9487d57a5c 45 /**
thedo 166:3a9487d57a5c 46 * Try to connect a midi device
thedo 166:3a9487d57a5c 47 *
thedo 166:3a9487d57a5c 48 * @return true if connection was successful
thedo 166:3a9487d57a5c 49 */
thedo 166:3a9487d57a5c 50 bool connect();
thedo 166:3a9487d57a5c 51
thedo 166:3a9487d57a5c 52 /**
thedo 166:3a9487d57a5c 53 * Attach a callback called when miscellaneous function code is received
thedo 166:3a9487d57a5c 54 *
thedo 166:3a9487d57a5c 55 * @param ptr function pointer
thedo 166:3a9487d57a5c 56 * prototype: void onMiscellaneousFunctionCode(uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 57 */
thedo 166:3a9487d57a5c 58 inline void attachMiscellaneousFunctionCode(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 59 miscellaneousFunctionCode = fn;
thedo 166:3a9487d57a5c 60 }
thedo 166:3a9487d57a5c 61
thedo 166:3a9487d57a5c 62 /**
thedo 166:3a9487d57a5c 63 * Attach a callback called when cable event is received
thedo 166:3a9487d57a5c 64 *
thedo 166:3a9487d57a5c 65 * @param ptr function pointer
thedo 166:3a9487d57a5c 66 * prototype: void onCableEvent(uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 67 */
thedo 166:3a9487d57a5c 68 inline void attachCableEvent(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 69 cableEvent = fn;
thedo 166:3a9487d57a5c 70 }
thedo 166:3a9487d57a5c 71
thedo 166:3a9487d57a5c 72 /**
thedo 166:3a9487d57a5c 73 * Attach a callback called when system exclusive is received
thedo 166:3a9487d57a5c 74 *
thedo 166:3a9487d57a5c 75 * @param ptr function pointer
thedo 166:3a9487d57a5c 76 * prototype: void onSystemCommonTwoBytes(uint8_t data1, uint8_t data2);
thedo 166:3a9487d57a5c 77 */
thedo 166:3a9487d57a5c 78 inline void attachSystemCommonTwoBytes(void (*fn)(uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 79 systemCommonTwoBytes = fn;
thedo 166:3a9487d57a5c 80 }
thedo 166:3a9487d57a5c 81
thedo 166:3a9487d57a5c 82 /**
thedo 166:3a9487d57a5c 83 * Attach a callback called when system exclusive is received
thedo 166:3a9487d57a5c 84 *
thedo 166:3a9487d57a5c 85 * @param ptr function pointer
thedo 166:3a9487d57a5c 86 * prototype: void onSystemCommonThreeBytes(uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 87 */
thedo 166:3a9487d57a5c 88 inline void attachSystemCommonThreeBytes(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 89 systemCommonThreeBytes = fn;
thedo 166:3a9487d57a5c 90 }
thedo 166:3a9487d57a5c 91
thedo 166:3a9487d57a5c 92 /**
thedo 166:3a9487d57a5c 93 * Attach a callback called when system exclusive is received
thedo 166:3a9487d57a5c 94 *
thedo 166:3a9487d57a5c 95 * @param ptr function pointer
thedo 166:3a9487d57a5c 96 * prototype: void onSystemExclusive(uint8_t *data, uint16_t length, bool hasNextData);
thedo 166:3a9487d57a5c 97 */
thedo 166:3a9487d57a5c 98 inline void attachSystemExclusive(void (*fn)(uint8_t *, uint16_t, bool)) {
thedo 166:3a9487d57a5c 99 systemExclusive = fn;
thedo 166:3a9487d57a5c 100 }
thedo 166:3a9487d57a5c 101
thedo 166:3a9487d57a5c 102 /**
thedo 166:3a9487d57a5c 103 * Attach a callback called when note on is received
thedo 166:3a9487d57a5c 104 *
thedo 166:3a9487d57a5c 105 * @param ptr function pointer
thedo 166:3a9487d57a5c 106 * prototype: void onNoteOn(uint8_t channel, uint8_t note, uint8_t velocity);
thedo 166:3a9487d57a5c 107 */
thedo 166:3a9487d57a5c 108 inline void attachNoteOn(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 109 noteOn = fn;
thedo 166:3a9487d57a5c 110 }
thedo 166:3a9487d57a5c 111
thedo 166:3a9487d57a5c 112 /**
thedo 166:3a9487d57a5c 113 * Attach a callback called when note off is received
thedo 166:3a9487d57a5c 114 *
thedo 166:3a9487d57a5c 115 * @param ptr function pointer
thedo 166:3a9487d57a5c 116 * prototype: void onNoteOff(uint8_t channel, uint8_t note, uint8_t velocity);
thedo 166:3a9487d57a5c 117 */
thedo 166:3a9487d57a5c 118 inline void attachNoteOff(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 119 noteOff = fn;
thedo 166:3a9487d57a5c 120 }
thedo 166:3a9487d57a5c 121
thedo 166:3a9487d57a5c 122 /**
thedo 166:3a9487d57a5c 123 * Attach a callback called when poly keypress is received
thedo 166:3a9487d57a5c 124 *
thedo 166:3a9487d57a5c 125 * @param ptr function pointer
thedo 166:3a9487d57a5c 126 * prototype: void onPolyKeyPress(uint8_t channel, uint8_t note, uint8_t pressure);
thedo 166:3a9487d57a5c 127 */
thedo 166:3a9487d57a5c 128 inline void attachPolyKeyPress(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 129 polyKeyPress = fn;
thedo 166:3a9487d57a5c 130 }
thedo 166:3a9487d57a5c 131
thedo 166:3a9487d57a5c 132 /**
thedo 166:3a9487d57a5c 133 * Attach a callback called when control change is received
thedo 166:3a9487d57a5c 134 *
thedo 166:3a9487d57a5c 135 * @param ptr function pointer
thedo 166:3a9487d57a5c 136 * prototype: void onControlChange(uint8_t channel, uint8_t key, uint8_t value);
thedo 166:3a9487d57a5c 137 */
thedo 166:3a9487d57a5c 138 inline void attachControlChange(void (*fn)(uint8_t, uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 139 controlChange = fn;
thedo 166:3a9487d57a5c 140 }
thedo 166:3a9487d57a5c 141
thedo 166:3a9487d57a5c 142 /**
thedo 166:3a9487d57a5c 143 * Attach a callback called when program change is received
thedo 166:3a9487d57a5c 144 *
thedo 166:3a9487d57a5c 145 * @param ptr function pointer
thedo 166:3a9487d57a5c 146 * prototype: void onProgramChange(uint8_t channel, uint8_t program);
thedo 166:3a9487d57a5c 147 */
thedo 166:3a9487d57a5c 148 inline void attachProgramChange(void (*fn)(uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 149 programChange = fn;
thedo 166:3a9487d57a5c 150 }
thedo 166:3a9487d57a5c 151
thedo 166:3a9487d57a5c 152 /**
thedo 166:3a9487d57a5c 153 * Attach a callback called when channel pressure is received
thedo 166:3a9487d57a5c 154 *
thedo 166:3a9487d57a5c 155 * @param ptr function pointer
thedo 166:3a9487d57a5c 156 * prototype: void onChannelPressure(uint8_t channel, uint8_t pressure);
thedo 166:3a9487d57a5c 157 */
thedo 166:3a9487d57a5c 158 inline void attachChannelPressure(void (*fn)(uint8_t, uint8_t)) {
thedo 166:3a9487d57a5c 159 channelPressure = fn;
thedo 166:3a9487d57a5c 160 }
thedo 166:3a9487d57a5c 161
thedo 166:3a9487d57a5c 162 /**
thedo 166:3a9487d57a5c 163 * Attach a callback called when pitch bend is received
thedo 166:3a9487d57a5c 164 *
thedo 166:3a9487d57a5c 165 * @param ptr function pointer
thedo 166:3a9487d57a5c 166 * prototype: void onPitchBend(uint8_t channel, uint16_t value);
thedo 166:3a9487d57a5c 167 */
thedo 166:3a9487d57a5c 168 inline void attachPitchBend(void (*fn)(uint8_t, uint16_t)) {
thedo 166:3a9487d57a5c 169 pitchBend = fn;
thedo 166:3a9487d57a5c 170 }
thedo 166:3a9487d57a5c 171
thedo 166:3a9487d57a5c 172 /**
thedo 166:3a9487d57a5c 173 * Attach a callback called when single byte is received
thedo 166:3a9487d57a5c 174 *
thedo 166:3a9487d57a5c 175 * @param ptr function pointer
thedo 166:3a9487d57a5c 176 * prototype: void onSingleByte(uint8_t value);
thedo 166:3a9487d57a5c 177 */
thedo 166:3a9487d57a5c 178 inline void attachSingleByte(void (*fn)(uint8_t)) {
thedo 166:3a9487d57a5c 179 singleByte = fn;
thedo 166:3a9487d57a5c 180 }
thedo 166:3a9487d57a5c 181
thedo 166:3a9487d57a5c 182 /**
thedo 166:3a9487d57a5c 183 * Send a cable event with 3 bytes event
thedo 166:3a9487d57a5c 184 *
thedo 166:3a9487d57a5c 185 * @param data1 0-255
thedo 166:3a9487d57a5c 186 * @param data2 0-255
thedo 166:3a9487d57a5c 187 * @param data3 0-255
thedo 166:3a9487d57a5c 188 * @return true if message sent successfully
thedo 166:3a9487d57a5c 189 */
thedo 166:3a9487d57a5c 190 bool sendMiscellaneousFunctionCode(uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 191
thedo 166:3a9487d57a5c 192 /**
thedo 166:3a9487d57a5c 193 * Send a cable event with 3 bytes event
thedo 166:3a9487d57a5c 194 *
thedo 166:3a9487d57a5c 195 * @param data1 0-255
thedo 166:3a9487d57a5c 196 * @param data2 0-255
thedo 166:3a9487d57a5c 197 * @param data3 0-255
thedo 166:3a9487d57a5c 198 * @return true if message sent successfully
thedo 166:3a9487d57a5c 199 */
thedo 166:3a9487d57a5c 200 bool sendCableEvent(uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 201
thedo 166:3a9487d57a5c 202 /**
thedo 166:3a9487d57a5c 203 * Send a system common message with 2 bytes event
thedo 166:3a9487d57a5c 204 *
thedo 166:3a9487d57a5c 205 * @param data1 0-255
thedo 166:3a9487d57a5c 206 * @param data2 0-255
thedo 166:3a9487d57a5c 207 * @return true if message sent successfully
thedo 166:3a9487d57a5c 208 */
thedo 166:3a9487d57a5c 209 bool sendSystemCommmonTwoBytes(uint8_t data1, uint8_t data2);
thedo 166:3a9487d57a5c 210
thedo 166:3a9487d57a5c 211 /**
thedo 166:3a9487d57a5c 212 * Send a system common message with 3 bytes event
thedo 166:3a9487d57a5c 213 *
thedo 166:3a9487d57a5c 214 * @param data1 0-255
thedo 166:3a9487d57a5c 215 * @param data2 0-255
thedo 166:3a9487d57a5c 216 * @param data3 0-255
thedo 166:3a9487d57a5c 217 * @return true if message sent successfully
thedo 166:3a9487d57a5c 218 */
thedo 166:3a9487d57a5c 219 bool sendSystemCommmonThreeBytes(uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 220
thedo 166:3a9487d57a5c 221 /**
thedo 166:3a9487d57a5c 222 * Send a system exclusive event
thedo 166:3a9487d57a5c 223 *
thedo 166:3a9487d57a5c 224 * @param buffer, starts with 0xF0, and end with 0xf7
thedo 166:3a9487d57a5c 225 * @param length
thedo 166:3a9487d57a5c 226 * @return true if message sent successfully
thedo 166:3a9487d57a5c 227 */
thedo 166:3a9487d57a5c 228 bool sendSystemExclusive(uint8_t *buffer, int length);
thedo 166:3a9487d57a5c 229
thedo 166:3a9487d57a5c 230 /**
thedo 166:3a9487d57a5c 231 * Send a note off event
thedo 166:3a9487d57a5c 232 *
thedo 166:3a9487d57a5c 233 * @param channel 0-15
thedo 166:3a9487d57a5c 234 * @param note 0-127
thedo 166:3a9487d57a5c 235 * @param velocity 0-127
thedo 166:3a9487d57a5c 236 * @return true if message sent successfully
thedo 166:3a9487d57a5c 237 */
thedo 166:3a9487d57a5c 238 bool sendNoteOff(uint8_t channel, uint8_t note, uint8_t velocity);
thedo 166:3a9487d57a5c 239
thedo 166:3a9487d57a5c 240 /**
thedo 166:3a9487d57a5c 241 * Send a note on event
thedo 166:3a9487d57a5c 242 *
thedo 166:3a9487d57a5c 243 * @param channel 0-15
thedo 166:3a9487d57a5c 244 * @param note 0-127
thedo 166:3a9487d57a5c 245 * @param velocity 0-127 (0 means note off)
thedo 166:3a9487d57a5c 246 * @return true if message sent successfully
thedo 166:3a9487d57a5c 247 */
thedo 166:3a9487d57a5c 248 bool sendNoteOn(uint8_t channel, uint8_t note, uint8_t velocity);
thedo 166:3a9487d57a5c 249
thedo 166:3a9487d57a5c 250 /**
thedo 166:3a9487d57a5c 251 * Send a poly keypress event
thedo 166:3a9487d57a5c 252 *
thedo 166:3a9487d57a5c 253 * @param channel 0-15
thedo 166:3a9487d57a5c 254 * @param note 0-127
thedo 166:3a9487d57a5c 255 * @param pressure 0-127
thedo 166:3a9487d57a5c 256 * @return true if message sent successfully
thedo 166:3a9487d57a5c 257 */
thedo 166:3a9487d57a5c 258 bool sendPolyKeyPress(uint8_t channel, uint8_t note, uint8_t pressure);
thedo 166:3a9487d57a5c 259
thedo 166:3a9487d57a5c 260 /**
thedo 166:3a9487d57a5c 261 * Send a control change event
thedo 166:3a9487d57a5c 262 *
thedo 166:3a9487d57a5c 263 * @param channel 0-15
thedo 166:3a9487d57a5c 264 * @param key 0-127
thedo 166:3a9487d57a5c 265 * @param value 0-127
thedo 166:3a9487d57a5c 266 * @return true if message sent successfully
thedo 166:3a9487d57a5c 267 */
thedo 166:3a9487d57a5c 268 bool sendControlChange(uint8_t channel, uint8_t key, uint8_t value);
thedo 166:3a9487d57a5c 269
thedo 166:3a9487d57a5c 270 /**
thedo 166:3a9487d57a5c 271 * Send a program change event
thedo 166:3a9487d57a5c 272 *
thedo 166:3a9487d57a5c 273 * @param channel 0-15
thedo 166:3a9487d57a5c 274 * @param program 0-127
thedo 166:3a9487d57a5c 275 * @return true if message sent successfully
thedo 166:3a9487d57a5c 276 */
thedo 166:3a9487d57a5c 277 bool sendProgramChange(uint8_t channel, uint8_t program);
thedo 166:3a9487d57a5c 278
thedo 166:3a9487d57a5c 279 /**
thedo 166:3a9487d57a5c 280 * Send a channel pressure event
thedo 166:3a9487d57a5c 281 *
thedo 166:3a9487d57a5c 282 * @param channel 0-15
thedo 166:3a9487d57a5c 283 * @param pressure 0-127
thedo 166:3a9487d57a5c 284 * @return true if message sent successfully
thedo 166:3a9487d57a5c 285 */
thedo 166:3a9487d57a5c 286 bool sendChannelPressure(uint8_t channel, uint8_t pressure);
thedo 166:3a9487d57a5c 287
thedo 166:3a9487d57a5c 288 /**
thedo 166:3a9487d57a5c 289 * Send a control change event
thedo 166:3a9487d57a5c 290 *
thedo 166:3a9487d57a5c 291 * @param channel 0-15
thedo 166:3a9487d57a5c 292 * @param key 0(lower)-8191(center)-16383(higher)
thedo 166:3a9487d57a5c 293 * @return true if message sent successfully
thedo 166:3a9487d57a5c 294 */
thedo 166:3a9487d57a5c 295 bool sendPitchBend(uint8_t channel, uint16_t value);
thedo 166:3a9487d57a5c 296
thedo 166:3a9487d57a5c 297 /**
thedo 166:3a9487d57a5c 298 * Send a single byte event
thedo 166:3a9487d57a5c 299 *
thedo 166:3a9487d57a5c 300 * @param data 0-255
thedo 166:3a9487d57a5c 301 * @return true if message sent successfully
thedo 166:3a9487d57a5c 302 */
thedo 166:3a9487d57a5c 303 bool sendSingleByte(uint8_t data);
thedo 166:3a9487d57a5c 304
thedo 166:3a9487d57a5c 305 protected:
thedo 166:3a9487d57a5c 306 //From IUSBEnumerator
thedo 166:3a9487d57a5c 307 virtual void setVidPid(uint16_t vid, uint16_t pid);
thedo 166:3a9487d57a5c 308 virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol); //Must return true if the interface should be parsed
thedo 166:3a9487d57a5c 309 virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used
thedo 166:3a9487d57a5c 310
thedo 166:3a9487d57a5c 311 private:
thedo 166:3a9487d57a5c 312 USBHost * host;
thedo 166:3a9487d57a5c 313 USBDeviceConnected * dev;
thedo 166:3a9487d57a5c 314 USBEndpoint * bulk_in;
thedo 166:3a9487d57a5c 315 USBEndpoint * bulk_out;
thedo 166:3a9487d57a5c 316 uint32_t size_bulk_in;
thedo 166:3a9487d57a5c 317 uint32_t size_bulk_out;
thedo 166:3a9487d57a5c 318
thedo 166:3a9487d57a5c 319 bool dev_connected;
thedo 166:3a9487d57a5c 320
thedo 166:3a9487d57a5c 321 void init();
thedo 166:3a9487d57a5c 322
thedo 166:3a9487d57a5c 323 uint8_t buf[64];
thedo 166:3a9487d57a5c 324
thedo 166:3a9487d57a5c 325 void rxHandler();
thedo 166:3a9487d57a5c 326
thedo 166:3a9487d57a5c 327 uint16_t sysExBufferPos;
thedo 166:3a9487d57a5c 328 uint8_t sysExBuffer[64];
thedo 166:3a9487d57a5c 329
thedo 166:3a9487d57a5c 330 void (*miscellaneousFunctionCode)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 331 void (*cableEvent)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 332 void (*systemCommonTwoBytes)(uint8_t, uint8_t);
thedo 166:3a9487d57a5c 333 void (*systemCommonThreeBytes)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 334 void (*systemExclusive)(uint8_t *, uint16_t, bool);
thedo 166:3a9487d57a5c 335 void (*noteOff)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 336 void (*noteOn)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 337 void (*polyKeyPress)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 338 void (*controlChange)(uint8_t, uint8_t, uint8_t);
thedo 166:3a9487d57a5c 339 void (*programChange)(uint8_t, uint8_t);
thedo 166:3a9487d57a5c 340 void (*channelPressure)(uint8_t, uint8_t);
thedo 166:3a9487d57a5c 341 void (*pitchBend)(uint8_t, uint16_t);
thedo 166:3a9487d57a5c 342 void (*singleByte)(uint8_t);
thedo 166:3a9487d57a5c 343
thedo 166:3a9487d57a5c 344 bool sendMidiBuffer(uint8_t data0, uint8_t data1, uint8_t data2, uint8_t data3);
thedo 166:3a9487d57a5c 345
thedo 166:3a9487d57a5c 346 int midi_intf;
thedo 166:3a9487d57a5c 347 bool midi_device_found;
thedo 166:3a9487d57a5c 348
thedo 166:3a9487d57a5c 349 };
thedo 166:3a9487d57a5c 350
thedo 166:3a9487d57a5c 351 #endif /* USBHOST_MIDI */
thedo 166:3a9487d57a5c 352
thedo 166:3a9487d57a5c 353 #endif /* USBHOSTMIDI_H */