partly working USB Device lib for STM32F746NG Discovery both Interface are working
Dependents: DISCO-F746NG-USB_Device McLighTT project_Keyboard_to_the_Keyboard MIDIInstrumentPADProject ... more
USBDevice/USBEndpoints.h@0:0a2eaa300982, 2016-07-31 (annotated)
- Committer:
- DieterGraef
- Date:
- Sun Jul 31 17:47:35 2016 +0000
- Revision:
- 0:0a2eaa300982
partly working USB Device library - serial and MIDI is working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DieterGraef | 0:0a2eaa300982 | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
DieterGraef | 0:0a2eaa300982 | 2 | * |
DieterGraef | 0:0a2eaa300982 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
DieterGraef | 0:0a2eaa300982 | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
DieterGraef | 0:0a2eaa300982 | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
DieterGraef | 0:0a2eaa300982 | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
DieterGraef | 0:0a2eaa300982 | 7 | * Software is furnished to do so, subject to the following conditions: |
DieterGraef | 0:0a2eaa300982 | 8 | * |
DieterGraef | 0:0a2eaa300982 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
DieterGraef | 0:0a2eaa300982 | 10 | * substantial portions of the Software. |
DieterGraef | 0:0a2eaa300982 | 11 | * |
DieterGraef | 0:0a2eaa300982 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
DieterGraef | 0:0a2eaa300982 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
DieterGraef | 0:0a2eaa300982 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
DieterGraef | 0:0a2eaa300982 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
DieterGraef | 0:0a2eaa300982 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
DieterGraef | 0:0a2eaa300982 | 17 | */ |
DieterGraef | 0:0a2eaa300982 | 18 | |
DieterGraef | 0:0a2eaa300982 | 19 | #ifndef USBENDPOINTS_H |
DieterGraef | 0:0a2eaa300982 | 20 | #define USBENDPOINTS_H |
DieterGraef | 0:0a2eaa300982 | 21 | |
DieterGraef | 0:0a2eaa300982 | 22 | /* SETUP packet size */ |
DieterGraef | 0:0a2eaa300982 | 23 | #define SETUP_PACKET_SIZE (8) |
DieterGraef | 0:0a2eaa300982 | 24 | |
DieterGraef | 0:0a2eaa300982 | 25 | /* Options flags for configuring endpoints */ |
DieterGraef | 0:0a2eaa300982 | 26 | #define DEFAULT_OPTIONS (0) |
DieterGraef | 0:0a2eaa300982 | 27 | #define SINGLE_BUFFERED (1U << 0) |
DieterGraef | 0:0a2eaa300982 | 28 | #define ISOCHRONOUS (1U << 1) |
DieterGraef | 0:0a2eaa300982 | 29 | #define RATE_FEEDBACK_MODE (1U << 2) /* Interrupt endpoints only */ |
DieterGraef | 0:0a2eaa300982 | 30 | |
DieterGraef | 0:0a2eaa300982 | 31 | /* Endpoint transfer status, for endpoints > 0 */ |
DieterGraef | 0:0a2eaa300982 | 32 | typedef enum { |
DieterGraef | 0:0a2eaa300982 | 33 | EP_COMPLETED, /* Transfer completed */ |
DieterGraef | 0:0a2eaa300982 | 34 | EP_PENDING, /* Transfer in progress */ |
DieterGraef | 0:0a2eaa300982 | 35 | EP_INVALID, /* Invalid parameter */ |
DieterGraef | 0:0a2eaa300982 | 36 | EP_STALLED, /* Endpoint stalled */ |
DieterGraef | 0:0a2eaa300982 | 37 | } EP_STATUS; |
DieterGraef | 0:0a2eaa300982 | 38 | |
DieterGraef | 0:0a2eaa300982 | 39 | /* Include configuration for specific target */ |
DieterGraef | 0:0a2eaa300982 | 40 | #if defined (TARGET_DISCO_F746NG) |
DieterGraef | 0:0a2eaa300982 | 41 | #include "USBEndpoints_STM32F7.h" |
DieterGraef | 0:0a2eaa300982 | 42 | #else |
DieterGraef | 0:0a2eaa300982 | 43 | #error "Unknown target type" |
DieterGraef | 0:0a2eaa300982 | 44 | #endif |
DieterGraef | 0:0a2eaa300982 | 45 | |
DieterGraef | 0:0a2eaa300982 | 46 | #endif |