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)) |
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_EP1_OUT_Callback (u8 bEP, u8 bEPStatus) |
| #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 |
0: interface not available
Called by USB driver to check for IN streams
Called by USB 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) |
>= 0: number of packages which are still in the buffer
| 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 |
-1: USB not connected
| 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 |
-1: USB not connected
-2: buffer is full caller should retry until buffer is free again
| 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!
1.4.7