瀏覽代碼

Merge pull request #279 from CurrentResident/usb_kb_setmedia_cpp

Only enable C++ set_media API if KEYMEDIA_INTERFACE is defined.
main
Paul Stoffregen 6 年之前
父節點
當前提交
010ab34a0c
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      teensy3/usb_keyboard.h

+ 2
- 0
teensy3/usb_keyboard.h 查看文件

@@ -87,6 +87,7 @@ public:
void set_key4(uint8_t c) { keyboard_keys[3] = c; }
void set_key5(uint8_t c) { keyboard_keys[4] = c; }
void set_key6(uint8_t c) { keyboard_keys[5] = c; }
#ifdef KEYMEDIA_INTERFACE
void set_media(uint16_t c) {
if (c == 0) {
usb_keymedia_release_all();
@@ -94,6 +95,7 @@ public:
press(c);
}
}
#endif
void send_now(void) { usb_keyboard_send(); }
void press(uint16_t n) { usb_keyboard_press_keycode(n); }
void release(uint16_t n) { usb_keyboard_release_keycode(n); }

Loading…
取消
儲存