Changeset 7dddd7b in mainline for uspace/drv/hid/usbhid/main.c
- Timestamp:
- 2018-01-13T20:47:58Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 71f211f
- Parents:
- 2489353
- git-author:
- Petr Manek <petr.manek@…> (2018-01-13 19:20:41)
- git-committer:
- Petr Manek <petr.manek@…> (2018-01-13 20:47:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/usbhid/main.c
r2489353 r7dddd7b 90 90 * This will create a separate fibril that will query the device 91 91 * for the data continuously. */ 92 rc = usb_device_auto_poll_desc(dev, 93 /* Index of the polling pipe. */ 94 hid_dev->poll_pipe_mapping->description, 95 /* Callback when data arrives. */ 96 usb_hid_polling_callback, 97 /* How much data to request. */ 98 hid_dev->poll_pipe_mapping->pipe.desc.max_transfer_size, 99 /* Delay */ 100 -1, 101 /* Callback when the polling fails. */ 102 usb_hid_polling_error_callback, 103 /* Callback when the polling ends. */ 104 usb_hid_polling_ended_callback, 105 /* Custom argument. */ 106 hid_dev); 92 const usb_device_auto_polling_t auto_polling = { 93 .debug = 1, 94 .auto_clear_halt = true, 95 .delay = -1, 96 .max_failures = 3, 97 .on_data = usb_hid_polling_callback, 98 .on_polling_end = usb_hid_polling_ended_callback, 99 .on_error = usb_hid_polling_error_callback, 100 .arg = hid_dev, 101 }; 102 103 rc = usb_device_auto_polling(dev, hid_dev->poll_pipe_mapping, 104 &auto_polling, hid_dev->poll_pipe_mapping->pipe.desc.max_transfer_size); 107 105 108 106 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.