Changeset 60c0573 in mainline for uspace/drv/usbhid/kbd/kbddev.c


Ignore:
Timestamp:
2011-04-10T15:17:22Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba358ed
Parents:
dc4c19e
Message:

Preparation for HID subdrivers.

  • Preparation for registering subdriver callbacks based on some device identifiers.
  • HID driver now uses one general callback which calls all the registered subdriver callbacks.
  • Other callbacks for init, deinit and polling ended.
  • Setting boot keyboard and mouse callbacks separately (special cases).

TODO maybe also functions and function classes may be per-subdriver

(so a hybrid keyboard/pointing device may register itself as

both keyboard and mouse).

TODO the current keyboard and mouse subdrivers should fall back to the

booot protocol by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/kbd/kbddev.c

    rdc4c19e r60c0573  
    856856/*----------------------------------------------------------------------------*/
    857857
    858 bool usb_kbd_polling_callback(usb_device_t *dev, uint8_t *buffer,
    859      size_t buffer_size, void *arg)
    860 {
    861         if (dev == NULL || buffer == NULL || arg == NULL) {
     858bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, uint8_t *buffer,
     859     size_t buffer_size)
     860{
     861        if (hid_dev == NULL || buffer == NULL) {
    862862                // do not continue polling (???)
    863863                return false;
    864864        }
    865        
    866         usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)arg;
    867865       
    868866        // TODO: add return value from this function
     
    916914/*----------------------------------------------------------------------------*/
    917915
    918 void usb_kbd_deinit(struct usb_hid_dev_t *hid_dev)
     916void usb_kbd_deinit(usb_hid_dev_t *hid_dev)
    919917{
    920918        if (hid_dev == NULL) {
Note: See TracChangeset for help on using the changeset viewer.