Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
midiUsb.c File Reference

Macros

#define MIDI_CONFIG_TOTAL_LEN   (TUD_CONFIG_DESC_LEN + TUD_MIDI_DESC_LEN)
 

Enumerations

enum  interface_count { ITF_NUM_MIDI = 0 , ITF_NUM_MIDI_STREAMING , ITF_COUNT }
 
enum  usb_endpoints { EP_EMPTY = 0 , EPNUM_MIDI }
 

Functions

bool usbMidiCallback (midiEvent_t *event)
 Check for and return the next MIDI event from USB.
 
bool installMidiUsb (void)
 Install the MIDI USB driver.
 

Macro Definition Documentation

◆ MIDI_CONFIG_TOTAL_LEN

#define MIDI_CONFIG_TOTAL_LEN   (TUD_CONFIG_DESC_LEN + TUD_MIDI_DESC_LEN)

Enumeration Type Documentation

◆ interface_count

Enumerator
ITF_NUM_MIDI 
ITF_NUM_MIDI_STREAMING 
ITF_COUNT 

◆ usb_endpoints

Enumerator
EP_EMPTY 
EPNUM_MIDI 

Function Documentation

◆ usbMidiCallback()

bool usbMidiCallback ( midiEvent_t * event)

Check for and return the next MIDI event from USB.

Parameters
[out]eventA pointer to an event
Returns
true if an event was written
false if no event was written

◆ installMidiUsb()

bool installMidiUsb ( void )

Install the MIDI USB driver.

Returns
true if the driver was successfully installed
false if the driver installation failed