Changeset a347a11 in mainline


Ignore:
Timestamp:
2011-09-20T19:20:37Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc255aa
Parents:
26e7d6d
Message:

Virt USB HID: generic routines for device "life"

The routines for data_in callback (from boot interface keyboard)
were made more generic to allow easier adding of new interfaces.

Location:
uspace/app/vuhid
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/vuhid/Makefile

    r26e7d6d ra347a11  
    5353        device.c \
    5454        ifaces.c \
     55        life.c \
    5556        stdreq.c \
    5657        $(SOURCES_INTERFACES)
  • uspace/app/vuhid/virthid.h

    r26e7d6d ra347a11  
    8282
    8383typedef struct {
     84        /** Buffer with data from device to the host. */
     85        uint8_t *data_in;
     86        /** Number of items in @c data_in.
     87         * The total size of @c data_in buffer shall be
     88         * <code>data_in_count * vuhid_interface_t.in_data_size</code>.
     89         */
     90        size_t data_in_count;
     91
     92        /** Current position in the data buffer. */
     93        size_t data_in_pos;
     94        /** Previous position. */
     95        size_t data_in_last_pos;
     96
     97        /** Delay between transition to "next" input buffer (in ms). */
     98        size_t data_in_pos_change_delay;
     99
     100        /** Message to print when interface becomes alive. */
     101        const char *msg_born;
     102        /** Message to print when interface dies. */
     103        const char *msg_die;
     104} vuhid_interface_life_t;
     105
     106typedef struct {
    84107        uint8_t length;
    85108        uint8_t type;
     
    94117void wait_for_interfaces_death(usbvirt_device_t *);
    95118
     119void interface_life_live(vuhid_interface_t *);
     120int interface_live_on_data_in(vuhid_interface_t *, void *, size_t, size_t *);
     121
     122
    96123#endif
    97124/**
Note: See TracChangeset for help on using the changeset viewer.