Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2014-01-17T17:26:48Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
5828554, cf982ff
Parents:
61b5b73d (diff), 66be0288 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libdrv cleanup.

  • move 'client side' device iface to libdrv (from libc)
  • hide remote_* libdrv headers
  • add a bunch of const qualifiers and change static data to const
  • cleanup: index initialized arrays, array size macro, removes duplicit enums, …

TODO

move hw_res, pio_window and co to libdrv. (too entangled with libc to move right now)
move clock_dev iface to libdrv. (also tied to libc, we need a time provider solution)

File:
1 edited

Legend:

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

    r61b5b73d r476f62c  
    4040#include <usb/usb.h>
    4141
    42 /** IPC methods for USB HID device interface. */
    43 typedef enum {
    44         /** Get number of events reported in single burst.
    45          * Parameters: none
    46          * Answer:
    47          * - Size of one report in bytes.
    48          */
    49         IPC_M_USBHID_GET_EVENT_LENGTH,
    50         /** Get single event from the HID device.
    51          * The word single refers to set of individual events that were
    52          * available at particular point in time.
    53          * Parameters:
    54          * - flags
    55          * The call is followed by data read expecting two concatenated
    56          * arrays.
    57          * Answer:
    58          * - EOK - events returned
    59          * - EAGAIN - no event ready (only in non-blocking mode)
    60          *
    61          * It is okay if the client requests less data. Extra data must
    62          * be truncated by the driver.
    63          *
    64          * @todo Change this comment.
    65          */
    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          * - EOK - method is implemented (expected always)
    74          * Parameters of the answer:
    75          * - Size of the report in bytes.
    76          */
    77         IPC_M_USBHID_GET_REPORT_DESCRIPTOR_LENGTH,
    78        
    79         /** Get the report descriptor from the HID device.
    80          *
    81          * Parameters:
    82          * - none
    83          * The call is followed by data read expecting the descriptor itself.
    84          * Answer:
    85          * - EOK - report descriptor returned.
    86          */
    87         IPC_M_USBHID_GET_REPORT_DESCRIPTOR
    88 } usbhid_iface_funcs_t;
    89 
    90 /** USB HID interface flag - return immediately if no data are available. */
    91 #define USBHID_IFACE_FLAG_NON_BLOCKING (1 << 0)
     42extern int usbhid_dev_get_event_length(async_sess_t *, size_t *);
     43extern int usbhid_dev_get_event(async_sess_t *, uint8_t *, size_t, size_t *,
     44    int *, unsigned int);
     45extern int usbhid_dev_get_report_descriptor_length(async_sess_t *, size_t *);
     46extern int usbhid_dev_get_report_descriptor(async_sess_t *, uint8_t *, size_t,
     47    size_t *);
    9248
    9349/** USB HID device communication interface. */
Note: See TracChangeset for help on using the changeset viewer.