Changeset ec6ab88 in mainline for uspace/lib/usb
- Timestamp:
- 2010-12-12T12:27:46Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1ca50b3
- Parents:
- 5174c62 (diff), 8365533 (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. - Location:
- uspace/lib/usb
- Files:
-
- 3 edited
-
include/usb/classes/hid.h (modified) (2 diffs)
-
include/usb/classes/hidparser.h (modified) (1 diff)
-
src/hidparser.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hid.h
r5174c62 rec6ab88 36 36 #define LIBUSB_HID_H_ 37 37 38 #include <usb/usb.h> 39 #include <driver.h> 40 #include <usb/classes/hidparser.h> 41 38 42 /** USB/HID device requests. */ 39 43 typedef enum { … … 54 58 } usb_hid_protocol_t; 55 59 60 /** 61 * @brief USB/HID keyboard device type. 62 * 63 * Quite dummy right now. 64 */ 65 typedef struct { 66 device_t *device; 67 usb_address_t address; 68 usb_endpoint_t default_ep; 69 usb_hid_report_parser_t *parser; 70 } usb_hid_dev_kbd_t; 71 56 72 #endif 57 73 /** -
uspace/lib/usb/include/usb/classes/hidparser.h
r5174c62 rec6ab88 50 50 * @param arg Custom argument. 51 51 */ 52 void (*keyboard)(const uint 32_t *key_codes, size_t count, void *arg);52 void (*keyboard)(const uint16_t *key_codes, size_t count, void *arg); 53 53 } usb_hid_report_in_callbacks_t; 54 54 -
uspace/lib/usb/src/hidparser.c
r5174c62 rec6ab88 62 62 const usb_hid_report_in_callbacks_t *callbacks, void *arg) 63 63 { 64 return ENOTSUP; 64 int i; 65 66 // TODO: parse report 67 68 uint16_t keys[6]; 69 70 for (i = 0; i < 6; ++i) { 71 keys[i] = data[i]; 72 } 73 74 callbacks->keyboard(keys, 6, arg); 65 75 } 66 76
Note:
See TracChangeset
for help on using the changeset viewer.
