Comments (8)
Another common class I would suggest is mass storage.
from libusb_stm32.
The MSC class definitions are partially done.
from libusb_stm32.
That should probably be tracked in a separate issue ;)
from libusb_stm32.
I already have a functional MIDI implementation using ST's Device Library for the F072, F373 and F746, so I should be able to port it over to this lib when I have some time..
from libusb_stm32.
I know this is a old one, but has anyone made any progress on the MIDI class?
from libusb_stm32.
No one but me. :)
But it's yet not completed nor tested. See this branch.
from libusb_stm32.
We need to add another struct to usb_midi.h (there might be other things I discover as I go through this as well):
// Class-Specific AC (Audio Control) Interface Descriptor
struct usb_midi_ac_interface_desc {
uint8_t bLength; /**<\brief Size of this descriptor in bytes. */
uint8_t bDescriptorType; /**<\brief CS_INTERFACE descriptor type. */
uint8_t bDescriptorSubType; /**<\brief MIDI_HEADER descriptor subtype. */
uint16_t bcdADC; /**<\brief AC SubClass Specification Release Number. */
uint16_t wTotalLength; /**<\brief Total size of class specific descriptors. */
uint8_t bInCollection; /**<\brief Number of streaming interfaces. */
uint8_t bInterfaceNumber; /**<\brief Index of the current interface. */
} __attribute__ ((packed));
from libusb_stm32.
The only other things that I think are missing from usb_midi.h are,
(a) adding the definition for USB_MIDI_SUBCLASS_STREAM
#define USB_CLASS_MIDI 0x01U /**<\brief MIDI Device class */
#define USB_MIDI_SUBCLASS_CONTROL 0x01U /**<\brief Data Interface class */
#define USB_MIDI_SUBCLASS_STREAM 0x03U /**<\brief MIDI Streaming */
(b) Preferred spelling of USB_MIDI_JACK_EXTERNAL
//#define USB_MIDI_JACK_EXTERNL 0x02U /**<\brief Declares external Jack */
#define USB_MIDI_JACK_EXTERNAL 0x02U /**<\brief Declares external Jack */
(c) Correction of baAssocJackID in usb_midi_class_ep_descriptor
struct usb_midi_class_ep_descriptor {
uint8_t bLength; /**<\brief Size of the descriptor, in bytes.*/
uint8_t bDescriptorType; /**<\brief CS_ENDPOINT descriptor.*/
uint8_t bDescriptorSubType; /**<\brief USB_DTYPE_MIDI_EP_GENERAL subtype.*/
uint8_t bNumEmbMIDIJack; /**<\brief Number of Embedded MIDI Jacks.*/
// uint8_t baAssocJackID[]; /**<\brief Embedded jacks ID's */
uint8_t baAssocJackID; /**<\brief Embedded jacks ID's */
} __attribute__((packed));
(d) and finally, if it is not elsewhere (I didn't see it), the 9-byte version of the bulk endpoints. This one I am not 100% sure of yet since I have not run the USB Compliance Suite and both endpoint versions for USB MIDI.
struct usb_bulk_endpoint_desc {
uint8_t bLength; /**<\brief Size of the descriptor, in bytes. */
uint8_t bDescriptorType; /**<\brief Endpoint descriptor.*/
uint8_t bEndpointAddress; /**<\brief Logical address of the endpoint within the device for
* the current configuration, including direction mask. */
uint8_t bmAttributes; /**<\brief Endpoint attributes, \ref USB_ENDPOINT_DEF. */
uint16_t wMaxPacketSize; /**<\brief Size of the endpoint bank, in bytes. This indicates the
* maximum packet size that the endpoint can receive at a time. */
uint8_t bInterval; /**<\brief Ignored for bulk. */
uint8_t bRefresh; /**<\brief */
uint8_t bSynchAddress; /**<\brief */
} __attribute__((packed));
See:
Example: https://github.com/kshoji/USB-MIDI-Link/blob/master/firmware/main.c
Discussion elsewhere: libopencm3/libopencm3#1130
from libusb_stm32.
Related Issues (20)
- STM32F411: Sending corrupted data HOT 18
- Thoughts on unimplemented USB_STD_SET_FEATURE & USB_STD_CLEAR_FEATURE for Device? HOT 7
- STM32L151C8 pma_write and pma_read BUG? HOT 7
- USB Compliance test failed (Chapter9) HOT 6
- Howto use this lib in a real project? HOT 3
- Greetings HOT 1
- cdc_loop example at high speed HOT 3
- Mass storage? HOT 1
- Add STM32 U5 Support HOT 2
- Add common usb_conf.h HOT 1
- Missing STM32F103x8
- Host?
- Missing vendor request demo
- with pedantic, this two places wont compile HOT 1
- Find out if there is any real data to read for an interrupt. HOT 2
- gd32 usbfs support HOT 7
- STM32L476RG assert failed: endpoint busy HOT 1
- Get data for USB HID Keyboard's LED via Class Request 0x09 (Set Report)? HOT 3
- Best way to control EP data send flow (ACK/NACK)? HOT 1
- Warning in usbd_stm32f103_devfs.c HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libusb_stm32.