Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/usbhid.c

    r9d58539 rad22fa4  
    5858        NULL
    5959};
    60 /*----------------------------------------------------------------------------*/
     60
    6161static int usb_hid_set_boot_kbd_subdriver(usb_hid_dev_t *hid_dev)
    6262{
     
    7474        return EOK;
    7575}
    76 /*----------------------------------------------------------------------------*/
     76
    7777static int usb_hid_set_boot_mouse_subdriver(usb_hid_dev_t *hid_dev)
    7878{
     
    9090        return EOK;
    9191}
    92 /*----------------------------------------------------------------------------*/
     92
    9393static int usb_hid_set_generic_hid_subdriver(usb_hid_dev_t *hid_dev)
    9494{
     
    110110        return EOK;
    111111}
    112 /*----------------------------------------------------------------------------*/
     112
    113113static bool usb_hid_ids_match(const usb_hid_dev_t *hid_dev,
    114114    const usb_hid_subdriver_mapping_t *mapping)
     
    122122            == mapping->product_id);
    123123}
    124 /*----------------------------------------------------------------------------*/
     124
    125125static bool usb_hid_path_matches(usb_hid_dev_t *hid_dev,
    126126    const usb_hid_subdriver_mapping_t *mapping)
     
    178178        return matches;
    179179}
    180 /*----------------------------------------------------------------------------*/
     180
    181181static int usb_hid_save_subdrivers(usb_hid_dev_t *hid_dev,
    182182    const usb_hid_subdriver_t **subdrivers, unsigned count)
     
    211211        return EOK;
    212212}
    213 /*----------------------------------------------------------------------------*/
     213
    214214static int usb_hid_find_subdrivers(usb_hid_dev_t *hid_dev)
    215215{
     
    263263        return usb_hid_save_subdrivers(hid_dev, subdrivers, count);
    264264}
    265 /*----------------------------------------------------------------------------*/
     265
    266266static int usb_hid_check_pipes(usb_hid_dev_t *hid_dev, const usb_device_t *dev)
    267267{
     
    290290        return ENOTSUP;
    291291}
    292 /*----------------------------------------------------------------------------*/
     292
    293293static int usb_hid_init_report(usb_hid_dev_t *hid_dev)
    294294{
     
    322322        return EOK;
    323323}
    324 /*----------------------------------------------------------------------------*/
     324
    325325/*
    326326 * This functions initializes required structures from the device's descriptors
     
    415415        }
    416416
    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 */
    427418        bool ok = false;
    428419        for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) {
     
    458449        return rc;
    459450}
    460 /*----------------------------------------------------------------------------*/
     451
    461452bool usb_hid_polling_callback(usb_device_t *dev, uint8_t *buffer,
    462453    size_t buffer_size, void *arg)
     
    500491        return cont;
    501492}
    502 /*----------------------------------------------------------------------------*/
     493
    503494void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason, void *arg)
    504495{
     
    517508        hid_dev->running = false;
    518509}
    519 /*----------------------------------------------------------------------------*/
     510
    520511void usb_hid_new_report(usb_hid_dev_t *hid_dev)
    521512{
    522513        ++hid_dev->report_nr;
    523514}
    524 /*----------------------------------------------------------------------------*/
     515
    525516int usb_hid_report_number(const usb_hid_dev_t *hid_dev)
    526517{
    527518        return hid_dev->report_nr;
    528519}
    529 /*----------------------------------------------------------------------------*/
     520
    530521void usb_hid_deinit(usb_hid_dev_t *hid_dev)
    531522{
Note: See TracChangeset for help on using the changeset viewer.