Ignore:
Timestamp:
2011-05-24T21:01:02Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a28b41d
Parents:
4e78236
Message:

A lot of changes to mkbd and HID interface.

  • mkbd Report parser initialization (getting report descriptor, parsing).
  • Getting report descriptor and its length from HID device added to HID interface (client and server stubs not implemented).
  • Fixed event type to uint8_t *.
  • Implemented these functions in generic HID driver.
  • Moved mapping from Consumer page usages to string descriptions moved to libusbhid.
  • Removed some temporary debug output.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usbhid_iface.h

    r4e78236 rd7c72db  
    4545         * Parameters: none
    4646         * Answer:
    47          * - EOK (expected always as long as device support USB HID interface)
    48          * Parameters of the answer:
    49          * - number of items
     47         * - Size of one report in bytes.
    5048         */
    5149        IPC_M_USBHID_GET_EVENT_LENGTH,
     
    6361         * It is okay if the client requests less data. Extra data must
    6462         * be truncated by the driver.
     63         *
     64         * @todo Change this comment.
    6565         */
    66         IPC_M_USBHID_GET_EVENT
     66        IPC_M_USBHID_GET_EVENT,
     67       
     68        /** Get the size of the report descriptor from the HID device.
     69         *
     70         * Parameters:
     71         * - none
     72         * Answer:
     73         * - Size of one report in bytes.
     74         * -
     75         *
     76         * @todo Finish this comment
     77         */
     78        IPC_M_USBHID_GET_REPORT_DESCRIPTOR_LENGTH,
     79       
     80        /** Get the report descriptor from the HID device.
     81         *
     82         * Parameters:
     83         * - none
     84         * Answer:
     85         * - EOK - report descriptor returned.
     86         * -
     87         *
     88         * @todo Finish this comment
     89         */
     90        IPC_M_USBHID_GET_REPORT_DESCRIPTOR
    6791} usbhid_iface_funcs_t;
    6892
     
    7599         *
    76100         * @param[in] fun DDF function answering the request.
    77          * @return Number of events or error code.
     101         * @return Size of the event in bytes.
    78102         */
    79103        size_t (*get_event_length)(ddf_fun_t *fun);
     
    87111         * @return Error code.
    88112         */
    89         int (*get_event)(ddf_fun_t *fun, int32_t *buffer, size_t size,
     113        int (*get_event)(ddf_fun_t *fun, uint8_t *buffer, size_t size,
    90114            size_t *act_size, unsigned int flags);
     115       
     116        /** Get size of the report descriptor in bytes.
     117         *
     118         * @param[in] fun DDF function answering the request.
     119         * @return Size of the report descriptor in bytes.
     120         */
     121        size_t (*get_report_descriptor_length)(ddf_fun_t *fun);
     122       
     123        /** Get the report descriptor from the HID device.
     124         *
     125         * @param[in] fun DDF function answering the request.
     126         * @param[out] desc Buffer with the report descriptor.
     127         * @param[out] size Size of the report descriptors in bytes.
     128         * @return Error code.
     129         */
     130        int (*get_report_descriptor)(ddf_fun_t *fun, uint8_t *desc,
     131            size_t size, size_t *act_size);
    91132} usbhid_iface_t;
    92133
Note: See TracChangeset for help on using the changeset viewer.