Changeset bbf79e0 in mainline for uspace/app/virtusbkbd/kbdconfig.c


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

Virtual keyboard configuration separated

From now on, all descriptors etc. shall be located in kbdconfig.c file.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/virtusbkbd/kbdconfig.c

    re22ce0b rbbf79e0  
    3232/**
    3333 * @file
    34  * @brief HIDE Report Descriptor.
     34 * @brief Keyboard configuration.
    3535 */
    36 #include "report.h"
     36#include "kbdconfig.h"
    3737#include <usb/hidut.h>
     38#include <usb/classes.h>
     39
     40/** Standard device descriptor. */
     41usb_standard_device_descriptor_t std_descriptor = {
     42        .length = sizeof(usb_standard_device_descriptor_t),
     43        .descriptor_type = 1,
     44        .usb_spec_version = 0x110,
     45        .device_class = USB_CLASS_HID,
     46        .device_subclass = 0,
     47        .device_protocol = 0,
     48        .max_packet_size = 64,
     49        .configuration_count = 1
     50};
     51size_t std_descriptor_size = sizeof(std_descriptor);
    3852
    3953/** USB keyboard report descriptor.
    4054 * Copied from USB HID 1.11 (section E.6).
    4155 */
    42 hid_descriptor_t report_descriptor = {
     56report_descriptor_data_t report_descriptor = {
    4357        STD_USAGE_PAGE(USB_HIDUT_PAGE_GENERIC_DESKTOP),
    4458        USAGE1(USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD),
     
    7993        END_COLLECTION()
    8094};
     95size_t report_descriptor_size = sizeof(report_descriptor);
    8196
    82 size_t report_descriptor_size = sizeof(report_descriptor);
     97/** HID descriptor. */
     98hid_descriptor_t hid_descriptor = {
     99        .length = sizeof(hid_descriptor_t),
     100        .type = 0x21, // HID descriptor
     101        .hid_spec_release = 0x101,
     102        .country_code = 0,
     103        .descriptor_count = 1,
     104        .descriptor1_type = 0x22, // Report descriptor
     105        .descriptor1_length = sizeof(report_descriptor)
     106};
     107size_t hid_descriptor_size = sizeof(hid_descriptor);
     108
    83109
    84110
Note: See TracChangeset for help on using the changeset viewer.