Changeset bbf79e0 in mainline
- Timestamp:
- 2010-10-12T12:56:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2193471
- Parents:
- e22ce0b
- Location:
- uspace/app/virtusbkbd
- Files:
-
- 2 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/virtusbkbd/Makefile
re22ce0b rbbf79e0 36 36 37 37 SOURCES = \ 38 report.c \38 kbdconfig.c \ 39 39 virtusbkbd.c 40 40 -
uspace/app/virtusbkbd/items.h
re22ce0b rbbf79e0 38 38 #include <sys/types.h> 39 39 40 typedef uint8_t hid_descriptor_t[];40 typedef uint8_t report_descriptor_data_t[]; 41 41 42 42 /* Item types. */ -
uspace/app/virtusbkbd/kbdconfig.c
re22ce0b rbbf79e0 32 32 /** 33 33 * @file 34 * @brief HIDE Report Descriptor.34 * @brief Keyboard configuration. 35 35 */ 36 #include " report.h"36 #include "kbdconfig.h" 37 37 #include <usb/hidut.h> 38 #include <usb/classes.h> 39 40 /** Standard device descriptor. */ 41 usb_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 }; 51 size_t std_descriptor_size = sizeof(std_descriptor); 38 52 39 53 /** USB keyboard report descriptor. 40 54 * Copied from USB HID 1.11 (section E.6). 41 55 */ 42 hid_descriptor_t report_descriptor = {56 report_descriptor_data_t report_descriptor = { 43 57 STD_USAGE_PAGE(USB_HIDUT_PAGE_GENERIC_DESKTOP), 44 58 USAGE1(USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD), … … 79 93 END_COLLECTION() 80 94 }; 95 size_t report_descriptor_size = sizeof(report_descriptor); 81 96 82 size_t report_descriptor_size = sizeof(report_descriptor); 97 /** HID descriptor. */ 98 hid_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 }; 107 size_t hid_descriptor_size = sizeof(hid_descriptor); 108 83 109 84 110 -
uspace/app/virtusbkbd/report.h
re22ce0b rbbf79e0 79 79 ITEM_CREATE1(ITEM_MAIN, TAG_OUTPUT, modifiers) 80 80 81 extern hid_descriptor_t report_descriptor;82 extern size_t report_descriptor_size;83 81 84 82 #endif -
uspace/app/virtusbkbd/virtusbkbd.c
re22ce0b rbbf79e0 52 52 #include <usbvirt/ids.h> 53 53 54 #include " report.h"54 #include "kbdconfig.h" 55 55 56 56 #define LOOPS 5 … … 80 80 return EOK; 81 81 } 82 83 static usb_standard_device_descriptor_t std_descriptor = {84 .length = sizeof(usb_standard_device_descriptor_t),85 .descriptor_type = 1,86 .usb_spec_version = 0x110,87 .device_class = 0x03,88 .device_subclass = 0,89 .device_protocol = 0,90 .max_packet_size = 64,91 .configuration_count = 192 };93 82 94 83 /** Keyboard callbacks.
Note:
See TracChangeset
for help on using the changeset viewer.