*** device.c 2005-05-04 17:32:49.000000000 +0900 --- device.c~ 2005-05-04 17:26:10.000000000 +0900 *************** *** 24,30 **** return err; } - #if 0 /* デバイスの初期化 */ LOCAL ERR device_init(W did, W bnumif, W bepadr) { --- 24,29 ---- *************** *** 46,89 **** fin0: return err; } - #endif - - /* デバイスの初期化 */ - LOCAL ERR device_init(W did, W bnumif, W bepadr) - { - ERR err; - usbDeviceRequest r; - UB buf[2]; - - /* SET_PROTOCOL(Report Protocol)を発行する */ - r.bmRequestType = 0x21; /* bmR_CLASS | bmR_INTERFACE */ - r.bRequest = 0x0b; /* SET_PROTOCOL */ - r.wValue = 0x0001; /* Report Protocol */ - r.wIndex = bnumif; - - err = usbRequestDevice(did, &r, NULL, 0, NULL); - if (err < ER_OK) { - D(0, ("device_init: usbRequestDevice %d\n", err)); - goto fin0; - } - - /* WACOM向けのコマンド */ - buf[0] = 0x02; - buf[1] = 0x02; - r.bmRequestType = 0x21; /* bmR_CLASS | bmR_INTERFACE */ - r.bRequest = 0x09; /* SET_REPORT */ - r.wValue = 0x0302; - r.wIndex = bnumif; - - err = usbRequestDevice(did, &r, buf, sizeof(buf), NULL); - if (err < ER_OK) { - D(0, ("device_init: usbRequestDevice %d\n", err)); - } - - fin0: - return err; - } - /* endpoint descriptorの検索 */ LOCAL VP find_nextdesc(VP vp, W size, W *remain, W type) --- 45,50 ----