Changeset 78bfae9 in mainline
- Timestamp:
- 2011-05-17T22:28:03Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- df44fa2
- Parents:
- 4880210
- Location:
- uspace/drv/usbhid
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/subdrivers.c
r4880210 r78bfae9 38 38 #include "usb/classes/hidpath.h" 39 39 40 //#include "lgtch-ultrax/lgtch-ultrax.h"41 40 #include "multimedia/multimedia.h" 42 41 #include "mouse/mousedev.h" 42 #include "generic/hiddev.h" 43 43 44 44 static usb_hid_subdriver_usage_t path_kbd[] = { … … 58 58 }; 59 59 60 static usb_hid_subdriver_usage_t generic_hid_key_path[] = { 61 {0, 0} 62 }; 63 60 64 const usb_hid_subdriver_mapping_t usb_hid_subdrivers[] = { 61 65 { 62 66 path_kbd, 63 -1,67 0, 64 68 USB_HID_PATH_COMPARE_BEGIN, 65 69 -1, … … 88 92 { 89 93 path_mouse, 90 -1,94 0, 91 95 USB_HID_PATH_COMPARE_BEGIN, 92 96 -1, … … 99 103 } 100 104 }, 105 { 106 generic_hid_key_path, 107 0, 108 USB_HID_PATH_COMPARE_ANYWHERE, 109 -1, 110 -1, 111 { 112 .init = usb_generic_hid_init, 113 .deinit = NULL, 114 .poll = usb_generic_hid_polling_callback, 115 .poll_end = NULL 116 } 117 }, 101 118 {NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL, NULL}} 102 119 }; -
uspace/drv/usbhid/usbhid.c
r4880210 r78bfae9 234 234 } 235 235 236 hid_dev->subdrivers = (usb_hid_subdriver_t *)malloc(count * 236 // add one generic HID subdriver per device 237 238 hid_dev->subdrivers = (usb_hid_subdriver_t *)malloc((count + 1) * 237 239 sizeof(usb_hid_subdriver_t)); 238 240 if (hid_dev->subdrivers == NULL) { … … 247 249 } 248 250 249 hid_dev->subdriver_count = count; 251 hid_dev->subdrivers[count].init = usb_generic_hid_init; 252 hid_dev->subdrivers[count].poll = usb_generic_hid_polling_callback; 253 hid_dev->subdrivers[count].deinit = NULL; 254 hid_dev->subdrivers[count].poll_end = NULL; 255 256 hid_dev->subdriver_count = count + 1; 250 257 251 258 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.