Ignore:
Timestamp:
2018-01-13T20:47:58Z (6 years ago)
Author:
Petr Manek <petr.manek@…>
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)
Message:

usbdev: refactor polling

Until now, device polling had to be executed by calling one of four
proxy functions, which served as a syntax sugar and had no clear
distinction between each other (not to mention misleading names and high
number of arguments).

In this commit, the four mentioned functions are discarded in favor of
one main function, which was proxied by them either way. The number of
arguments have decreased in favor of named struct fields in the auto
polling config structure.

Drivers, which make use of polling, such as usbhid and usbhub were
updated to the latest API design.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/poll.h

    r2489353 r7dddd7b  
    9696typedef void (*usb_polling_terminted_callback_t)(usb_device_t *, bool, void *);
    9797
    98 extern int usb_device_auto_polling(usb_device_t *, usb_endpoint_t,
     98extern int usb_device_auto_polling(usb_device_t *, usb_endpoint_mapping_t *,
    9999    const usb_device_auto_polling_t *, size_t);
    100 
    101 extern int usb_device_auto_poll(usb_device_t *, usb_endpoint_t,
    102     usb_polling_callback_t, size_t, int, usb_polling_terminted_callback_t, void *);
    103 
    104 extern int usb_device_auto_polling_desc(usb_device_t *,
    105     const usb_endpoint_description_t *, const usb_device_auto_polling_t *,
    106     size_t);
    107 
    108 extern int usb_device_auto_poll_desc(usb_device_t *,
    109     const usb_endpoint_description_t *, usb_polling_callback_t, size_t, int,
    110     usb_polling_error_callback_t, usb_polling_terminted_callback_t, void *);
    111100
    112101#endif
Note: See TracChangeset for help on using the changeset viewer.