#endif | #endif | ||||
// This 32 bit input format is documented in the "Universal Serial Bus Device Class | |||||
// Definition for MIDI Devices" specification, version 1.0, Nov 1, 1999. It can be | |||||
// downloaded from www.usb.org. https://www.usb.org/sites/default/files/midi10.pdf | |||||
// If the USB-IF reorganizes their website and this link no longer works, Google | |||||
// search the name to find it. This data format is shown on page 16 in Figure #8. | |||||
// Byte 0 (shown on the left hand side of Figure #8) is the least significant byte | |||||
// of this 32 bit input. | |||||
void usb_midi_write_packed(uint32_t n) | void usb_midi_write_packed(uint32_t n) | ||||
{ | { | ||||
uint32_t index, wait_count=0; | uint32_t index, wait_count=0; |
#define TX_TIMEOUT_MSEC 40 | #define TX_TIMEOUT_MSEC 40 | ||||
// This 32 bit input format is documented in the "Universal Serial Bus Device Class | |||||
// Definition for MIDI Devices" specification, version 1.0, Nov 1, 1999. It can be | |||||
// downloaded from www.usb.org. https://www.usb.org/sites/default/files/midi10.pdf | |||||
// If the USB-IF reorganizes their website and this link no longer works, Google | |||||
// search the name to find it. This data format is shown on page 16 in Figure #8. | |||||
// Byte 0 (shown on the left hand side of Figure #8) is the least significant byte | |||||
// of this 32 bit input. | |||||
void usb_midi_write_packed(uint32_t n) | void usb_midi_write_packed(uint32_t n) | ||||
{ | { | ||||
printf("usb_midi_write_packed\n"); | printf("usb_midi_write_packed\n"); |
} | } | ||||
} | } | ||||
// This 4 byte input format is documented in the "Universal Serial Bus Device Class | |||||
// Definition for MIDI Devices" specification, version 1.0, Nov 1, 1999. It can be | |||||
// downloaded from www.usb.org. https://www.usb.org/sites/default/files/midi10.pdf | |||||
// If the USB-IF reorganizes their website and this link no longer works, Google | |||||
// search the name to find it. This data format is shown on page 16 in Figure #8. | |||||
// Byte 0 (shown on the left hand side of Figure #8) is b0, Byte 1 is b1, etc. | |||||
void usb_midi_class::send_raw(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3) | void usb_midi_class::send_raw(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3) | ||||
{ | { | ||||
uint8_t intr_state, timeout; | uint8_t intr_state, timeout; |