Ignore:
File:
1 edited

Legend:

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

    rad22fa4 r9d58539  
    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         /* 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         */
    418427        bool ok = false;
    419428        for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) {
     
    449458        return rc;
    450459}
    451 
     460/*----------------------------------------------------------------------------*/
    452461bool usb_hid_polling_callback(usb_device_t *dev, uint8_t *buffer,
    453462    size_t buffer_size, void *arg)
     
    491500        return cont;
    492501}
    493 
     502/*----------------------------------------------------------------------------*/
    494503void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason, void *arg)
    495504{
     
    508517        hid_dev->running = false;
    509518}
    510 
     519/*----------------------------------------------------------------------------*/
    511520void usb_hid_new_report(usb_hid_dev_t *hid_dev)
    512521{
    513522        ++hid_dev->report_nr;
    514523}
    515 
     524/*----------------------------------------------------------------------------*/
    516525int usb_hid_report_number(const usb_hid_dev_t *hid_dev)
    517526{
    518527        return hid_dev->report_nr;
    519528}
    520 
     529/*----------------------------------------------------------------------------*/
    521530void usb_hid_deinit(usb_hid_dev_t *hid_dev)
    522531{
Note: See TracChangeset for help on using the changeset viewer.