Changeset 5247411 in mainline


Ignore:
Timestamp:
2010-10-12T10:36:18Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e22ce0b
Parents:
2c970ee
Message:

Prepared HID report descriptor

The report descriptor for virtual USB keyboard was copied
from USB HID specification (section E.6).

Location:
uspace/app/virtusbkbd
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/virtusbkbd/Makefile

    r2c970ee r5247411  
    3636
    3737SOURCES = \
     38        report.c \
    3839        virtusbkbd.c
    3940
  • uspace/app/virtusbkbd/virtusbkbd.c

    r2c970ee r5247411  
    5151#include <usbvirt/hub.h>
    5252#include <usbvirt/ids.h>
     53
     54#include "report.h"
    5355
    5456#define LOOPS 5
     
    118120int main(int argc, char * argv[])
    119121{
     122        printf("Dump of report descriptor (%u bytes):\n", report_descriptor_size);
     123        size_t i;
     124        for (i = 0; i < report_descriptor_size; i++) {
     125                printf("  0x%02X", report_descriptor[i]);
     126                if (((i > 0) && (((i+1) % 10) == 0))
     127                    || (i + 1 == report_descriptor_size)) {
     128                        printf("\n");
     129                }
     130        }
     131       
     132       
    120133        int rc = usbvirt_connect(&keyboard_dev, DEV_HCD_NAME);
    121134        if (rc != EOK) {
     
    125138        }
    126139       
    127         size_t i;
     140       
    128141        for (i = 0; i < LOOPS; i++) {
    129142                size_t size = 5;
Note: See TracChangeset for help on using the changeset viewer.