ソースを参照

Update usb_mouse.c

teensy4-core
Xenoamor 9年前
コミット
ddd8a6d76d
1個のファイルの変更7行の追加9行の削除
  1. +7
    -9
      teensy3/usb_mouse.c

+ 7
- 9
teensy3/usb_mouse.c ファイルの表示

@@ -95,13 +95,15 @@ static uint32_t usb_mouse_offset_y=DEFAULT_YSCALE/2-1;

// Set the mouse buttons. To create a "click", 2 calls are needed,
// one to push the button down and the second to release it
int usb_mouse_buttons(uint8_t left, uint8_t middle, uint8_t right)
int usb_mouse_buttons(uint8_t left, uint8_t middle, uint8_t right, uint8_t back, uint8_t forward)
{
uint8_t mask=0;

if (left) mask |= 1;
if (middle) mask |= 4;
if (right) mask |= 2;
if (left) mask |= 1;
if (middle) mask |= 4;
if (right) mask |= 2;
if (back) mask |= 8;
if (forward) mask |= 16;
usb_mouse_buttons_state = mask;
return usb_mouse_move(0, 0, 0);
}
@@ -115,11 +117,7 @@ static uint8_t transmit_previous_timeout=0;
// When the PC isn't listening, how long do we wait before discarding data?
#define TX_TIMEOUT_MSEC 30

#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#if F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

読み込み中…
キャンセル
保存