Defines | |
#define | RX_BUFFER_MAX_ANALYSIS 0 |
#define | EP2IDX(bEP) ((((bEP)&0xF)<<1)|(((bEP)&0x80)>>7)) |
#define | IDX2EP(idx) ((((idx)<<7)&0x80)|(((idx)>>1)&0xF)) |
Enumerations | |
enum | USBH_MIDI_transfer_state_t { USBH_MIDI_IDLE, USBH_MIDI_RX, USBH_MIDI_TX } |
Functions | |
s32 | MIOS32_USB_MIDI_Init (u32 mode) |
s32 | MIOS32_USB_MIDI_ChangeConnectionState (u8 connected) |
s32 | MIOS32_USB_MIDI_CheckAvailable (u8 cable) |
s32 | MIOS32_USB_MIDI_PackageSend_NonBlocking (mios32_midi_package_t package) |
s32 | MIOS32_USB_MIDI_PackageSend (mios32_midi_package_t package) |
s32 | MIOS32_USB_MIDI_PackageReceive (mios32_midi_package_t *package) |
s32 | MIOS32_USB_MIDI_Periodic_mS (void) |
void | MIOS32_USB_MIDI_EP1_IN_Callback (u8 bEP, u8 bEPStatus) |
void | MIOS32_USB_MIDI_EP2_OUT_Callback (u8 bEP, u8 bEPStatus) |
Variables | |
USB_OTG_CORE_HANDLE | USB_OTG_dev |
uint32_t | USB_rx_buffer [MIOS32_USB_MIDI_DATA_OUT_SIZE/4] |
USBH_HOST | USB_Host |
const USBH_Class_cb_TypeDef | MIOS32_MIDI_USBH_Callbacks |
USB MIDI layer for MIOS32
USB MIDI layer for MIOS32
Applications shouldn't call these functions directly, instead please use MIOS32_MIDI layer functions
#define EP2IDX | ( | bEP | ) | ((((bEP)&0xF)<<1)|(((bEP)&0x80)>>7)) |
convert from endpoint address to endpoint index
#define IDX2EP | ( | idx | ) | ((((idx)<<7)&0x80)|(((idx)>>1)&0xF)) |
convert from endpoint index to endpoint address
#define RX_BUFFER_MAX_ANALYSIS 0 |
This function is called by the USB driver on cable connection/disconnection
[in] | connected | status (1 if connected) |
This function returns the connection status of the USB MIDI interface
[in] | cable | number |
Called by USB driver to check for IN streams
Called by STM32 USB driver to check for IN streams
Called by STM32 USB Device driver to check for IN streams
Called by USB driver to check for OUT streams
Called by STM32 USB driver to check for OUT streams
Called by STM32 USB Device driver to check for OUT streams
Initializes USB MIDI layer
[in] | mode | currently only mode 0 supported |
s32 MIOS32_USB_MIDI_PackageReceive | ( | mios32_midi_package_t * | package | ) |
This function checks for a new package
[out] | package | pointer to MIDI package (received package will be put into the given variable) |
s32 MIOS32_USB_MIDI_PackageSend | ( | mios32_midi_package_t | package | ) |
This function puts a new MIDI package into the Tx buffer (blocking function)
[in] | package | MIDI package |
s32 MIOS32_USB_MIDI_PackageSend_NonBlocking | ( | mios32_midi_package_t | package | ) |
This function puts a new MIDI package into the Tx buffer
[in] | package | MIDI package |
s32 MIOS32_USB_MIDI_Periodic_mS | ( | void | ) |
This function should be called periodically each mS to handle timeout and expire counters.
For USB MIDI it also checks for incoming/outgoing USB packages!
Not for use in an application - this function is called from MIOS32_MIDI_Periodic_mS(), which is called by a task in the programming model!
const USBH_Class_cb_TypeDef MIOS32_MIDI_USBH_Callbacks |
{ USBH_InterfaceInit, USBH_InterfaceDeInit, USBH_ClassRequest, USBH_Handle }
USBH_HOST USB_Host |
USB_OTG_CORE_HANDLE USB_OTG_dev |
uint32_t USB_rx_buffer[MIOS32_USB_MIDI_DATA_OUT_SIZE/4] |