Changes in uspace/drv/bus/usb/usbhid/usbhid.c [ad22fa4:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/usbhid.c
rad22fa4 r9d58539 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 /* Initialize subdrivers */ 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 */ 418 427 bool ok = false; 419 428 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { … … 449 458 return rc; 450 459 } 451 460 /*----------------------------------------------------------------------------*/ 452 461 bool usb_hid_polling_callback(usb_device_t *dev, uint8_t *buffer, 453 462 size_t buffer_size, void *arg) … … 491 500 return cont; 492 501 } 493 502 /*----------------------------------------------------------------------------*/ 494 503 void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason, void *arg) 495 504 { … … 508 517 hid_dev->running = false; 509 518 } 510 519 /*----------------------------------------------------------------------------*/ 511 520 void usb_hid_new_report(usb_hid_dev_t *hid_dev) 512 521 { 513 522 ++hid_dev->report_nr; 514 523 } 515 524 /*----------------------------------------------------------------------------*/ 516 525 int usb_hid_report_number(const usb_hid_dev_t *hid_dev) 517 526 { 518 527 return hid_dev->report_nr; 519 528 } 520 529 /*----------------------------------------------------------------------------*/ 521 530 void usb_hid_deinit(usb_hid_dev_t *hid_dev) 522 531 {
Note:
See TracChangeset
for help on using the changeset viewer.