Explorar el Código

Add comments for USB MIDI 32 bit format data format

main
PaulStoffregen hace 4 años
padre
commit
8a8b9914f9
Se han modificado 3 ficheros con 20 adiciones y 0 borrados
  1. +7
    -0
      teensy3/usb_midi.c
  2. +7
    -0
      teensy4/usb_midi.c
  3. +6
    -0
      usb_midi/usb_api.cpp

+ 7
- 0
teensy3/usb_midi.c Ver fichero

@@ -103,6 +103,13 @@ static uint8_t tx_noautoflush=0;
#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)
{
uint32_t index, wait_count=0;

+ 7
- 0
teensy4/usb_midi.c Ver fichero

@@ -130,6 +130,13 @@ void usb_midi_configure(void)
#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)
{
printf("usb_midi_write_packed\n");

+ 6
- 0
usb_midi/usb_api.cpp Ver fichero

@@ -73,6 +73,12 @@ void usb_midi_class::sendSysEx_AddTermBytes(uint16_t length, const uint8_t *data
}
}

// 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)
{
uint8_t intr_state, timeout;

Cargando…
Cancelar
Guardar