FreeBSD で認識するかどうか条件によって変わる問題

まとめ

[エラーメッセージ(USB_ERR_TIMEOUTT)]
Dec 12 03:03:26 milk kernel: usbus4: port reset timeout
Dec 12 03:03:26 milk kernel:
uhub_reattach_port: port 3 reset failed, error=USB_ERR_TIMEOUT
Dec 12 03:03:26 milk kernel: uhub_reattach_port:
device problem (USB_ERR_TIMEOUT), disabling port 3
[エラーメッセージ(USB_ERR_STALLE)]
Dec 12 03:43:28 milk kernel:
usb_alloc_device: set address 3 failed (USB_ERR_STALLED, ignored)
Dec 12 03:43:30 milk kernel:
usbd_setup_device_desc: getting device descriptor at addr 3 failed,
USB_ERR_STALLED
Dec 12 03:43:30 milk kernel:
usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_STALLED, ignored)
[エラーメッセージ(USB_ERR_IOERROR)]
Dec 12 20:52:49 milk kernel:
usb_alloc_device: set address 4 failed (USB_ERR_IOERROR, ignored)
Dec 12 20:52:51 milk kernel:
usbd_setup_device_desc:getting device descriptor at addr 4 failed,
USB_ERR_IOERROR
Dec 12 20:52:51 milk kernel:
usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_IOERROR, ignored)

改良

usbInit(); // *1
uchar j=0; // *1
while(--j){
    wdt_reset(); // if watchdog is active, reset it // *1
    _delay_ms(4); } // *1
} // *1
usbDeviceDisconnect();
uchar i = 0;
while(--i){       // fake USB disconnect for > 250 ms
    wdt_reset();  // if watchdog is active, reset it
    _delay_ms(1); // library call -- has limited range
}
usbDeviceConnect();

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS