Changes in uspace/drv/bus/usb/usbhid/usbhid.c [9d58539:ad22fa4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/usbhid.c
r9d58539 rad22fa4 58 58 NULL 59 59 }; 60 /*----------------------------------------------------------------------------*/ 60 61 61 static int usb_hid_set_boot_kbd_subdriver(usb_hid_dev_t *hid_dev) 62 62 { … … 74 74 return EOK; 75 75 } 76 /*----------------------------------------------------------------------------*/ 76 77 77 static int usb_hid_set_boot_mouse_subdriver(usb_hid_dev_t *hid_dev) 78 78 { … … 90 90 return EOK; 91 91 } 92 /*----------------------------------------------------------------------------*/ 92 93 93 static int usb_hid_set_generic_hid_subdriver(usb_hid_dev_t *hid_dev) 94 94 { … … 110 110 return EOK; 111 111 } 112 /*----------------------------------------------------------------------------*/ 112 113 113 static bool usb_hid_ids_match(const usb_hid_dev_t *hid_dev, 114 114 const usb_hid_subdriver_mapping_t *mapping) … … 122 122 == mapping->product_id); 123 123 } 124 /*----------------------------------------------------------------------------*/ 124 125 125 static bool usb_hid_path_matches(usb_hid_dev_t *hid_dev, 126 126 const usb_hid_subdriver_mapping_t *mapping) … … 178 178 return matches; 179 179 } 180 /*----------------------------------------------------------------------------*/ 180 181 181 static int usb_hid_save_subdrivers(usb_hid_dev_t *hid_dev, 182 182 const usb_hid_subdriver_t **subdrivers, unsigned count) … … 211 211 return EOK; 212 212 } 213 /*----------------------------------------------------------------------------*/ 213 214 214 static int usb_hid_find_subdrivers(usb_hid_dev_t *hid_dev) 215 215 { … … 263 263 return usb_hid_save_subdrivers(hid_dev, subdrivers, count); 264 264 } 265 /*----------------------------------------------------------------------------*/ 265 266 266 static int usb_hid_check_pipes(usb_hid_dev_t *hid_dev, const usb_device_t *dev) 267 267 { … … 290 290 return ENOTSUP; 291 291 } 292 /*----------------------------------------------------------------------------*/ 292 293 293 static int usb_hid_init_report(usb_hid_dev_t *hid_dev) 294 294 { … … 322 322 return EOK; 323 323 } 324 /*----------------------------------------------------------------------------*/ 324 325 325 /* 326 326 * This functions initializes required structures from the device's descriptors … … 415 415 } 416 416 417 /* 418 * 1) subdriver vytvori vlastnu ddf_fun, vlastne ddf_dev_ops, ktore da 419 * do nej. 420 * 2) do tych ops do .interfaces[DEV_IFACE_USBHID (asi)] priradi 421 * vyplnenu strukturu usbhid_iface_t. 422 * 3) klientska aplikacia - musi si rucne vytvorit telefon 423 * (devman_device_connect() - cesta k zariadeniu (/hw/pci0/...) az 424 * k tej fcii. 425 * pouzit usb/classes/hid/iface.h - prvy int je telefon 426 */ 417 /* Initialize subdrivers */ 427 418 bool ok = false; 428 419 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { … … 458 449 return rc; 459 450 } 460 /*----------------------------------------------------------------------------*/ 451 461 452 bool usb_hid_polling_callback(usb_device_t *dev, uint8_t *buffer, 462 453 size_t buffer_size, void *arg) … … 500 491 return cont; 501 492 } 502 /*----------------------------------------------------------------------------*/ 493 503 494 void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason, void *arg) 504 495 { … … 517 508 hid_dev->running = false; 518 509 } 519 /*----------------------------------------------------------------------------*/ 510 520 511 void usb_hid_new_report(usb_hid_dev_t *hid_dev) 521 512 { 522 513 ++hid_dev->report_nr; 523 514 } 524 /*----------------------------------------------------------------------------*/ 515 525 516 int usb_hid_report_number(const usb_hid_dev_t *hid_dev) 526 517 { 527 518 return hid_dev->report_nr; 528 519 } 529 /*----------------------------------------------------------------------------*/ 520 530 521 void usb_hid_deinit(usb_hid_dev_t *hid_dev) 531 522 {
Note:
See TracChangeset
for help on using the changeset viewer.