瀏覽代碼

Fix sendRealTime (thanks capricorn-one)

fixes #138
teensy4-core
PaulStoffregen 8 年之前
父節點
當前提交
06c8b9ceab
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. +1
    -2
      teensy3/usb_midi.h

+ 1
- 2
teensy3/usb_midi.h 查看文件

usb_midi_send_sysex(data, length); usb_midi_send_sysex(data, length);
} }
void sendRealTime(uint32_t type) __attribute__((always_inline)) { void sendRealTime(uint32_t type) __attribute__((always_inline)) {
uint32_t data = ( (type & 0xFF) | ((type << 8) & 0xFF00) );
switch (type) { switch (type) {
case 0xF8: // Clock case 0xF8: // Clock
case 0xFA: // Start case 0xFA: // Start
case 0xFB: // Continue case 0xFB: // Continue
case 0xFE: // ActiveSensing case 0xFE: // ActiveSensing
case 0xFF: // SystemReset case 0xFF: // SystemReset
usb_midi_write_packed(data);
usb_midi_write_packed((type << 8) | 0x0F);
break; break;
default: // Invalid Real Time marker default: // Invalid Real Time marker
break; break;

Loading…
取消
儲存