Changeset a76b01b4 in mainline for uspace/lib/usbhid/src
- Timestamp:
- 2012-02-24T19:11:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a2bd8822
- Parents:
- 76fbd9a
- Location:
- uspace/lib/usbhid/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hiddescriptor.c
r76fbd9a ra76b01b4 41 41 #include <assert.h> 42 42 43 /*---------------------------------------------------------------------------*/ 43 44 44 /* 45 45 * Constants defining current parsing mode for correct parsing of the set of … … 61 61 #define INSIDE_DELIMITER_SET 2 62 62 63 /*---------------------------------------------------------------------------*/ 63 64 64 65 65 /** The new report item flag. Used to determine when the item is completly … … 78 78 #define USB_HID_UNKNOWN_TAG -99 79 79 80 /*---------------------------------------------------------------------------*/ 80 81 81 /** 82 82 * Checks if given collection path is already present in report structure and … … 124 124 } 125 125 126 /*---------------------------------------------------------------------------*/ 126 127 127 /** 128 128 * Initialize the report descriptor parser structure … … 147 147 } 148 148 149 /*---------------------------------------------------------------------------*/ 149 150 150 151 151 /** … … 314 314 return EOK; 315 315 } 316 /*---------------------------------------------------------------------------*/ 316 317 317 /** 318 318 * Finds description of report with given report_id and of given type in … … 348 348 return NULL; 349 349 } 350 /*---------------------------------------------------------------------------*/ 350 351 351 352 352 /** Parse HID report descriptor. … … 536 536 } 537 537 538 /*---------------------------------------------------------------------------*/ 538 539 539 540 540 /** … … 871 871 return EOK; 872 872 } 873 /*---------------------------------------------------------------------------*/ 873 874 874 875 875 /** … … 892 892 return result; 893 893 } 894 /*---------------------------------------------------------------------------*/ 894 895 895 896 896 /** … … 941 941 942 942 } 943 /*---------------------------------------------------------------------------*/ 943 944 944 945 945 /** … … 972 972 } 973 973 } 974 /*---------------------------------------------------------------------------*/ 974 975 975 976 976 … … 1022 1022 return; 1023 1023 } 1024 /*---------------------------------------------------------------------------*/ 1024 1025 1025 1026 1026 /** -
uspace/lib/usbhid/src/hidparser.c
r76fbd9a ra76b01b4 41 41 #include <assert.h> 42 42 43 /*---------------------------------------------------------------------------*/ 43 44 44 /* 45 45 * Data translation private functions … … 52 52 int32_t value); 53 53 54 /*---------------------------------------------------------------------------*/ 54 55 55 56 56 static int usb_pow(int a, int b) … … 68 68 } 69 69 } 70 /*---------------------------------------------------------------------------*/ 70 71 71 72 72 /** Returns size of report of specified report id and type in items … … 117 117 } 118 118 } 119 /*---------------------------------------------------------------------------*/ 119 120 120 121 121 /** Parse and act upon a HID report. … … 192 192 } 193 193 194 /*---------------------------------------------------------------------------*/ 194 195 195 /** 196 196 * Translate data from the report as specified in report descriptor item … … 274 274 } 275 275 276 /*---------------------------------------------------------------------------*/ 276 277 277 /* OUTPUT API */ 278 278 … … 431 431 } 432 432 433 /*---------------------------------------------------------------------------*/ 433 434 434 /** 435 435 * Translate given data for putting them into the outoput report … … 476 476 } 477 477 478 /*---------------------------------------------------------------------------*/ 478 479 479 /** 480 480 * Clones given state table … … 497 497 } 498 498 499 /*---------------------------------------------------------------------------*/ 499 500 500 /** 501 501 * Function for sequence walking through the report. Returns next field in the … … 552 552 } 553 553 554 /*---------------------------------------------------------------------------*/ 554 555 555 /** 556 556 * Returns next report_id of report of specified type. If zero is given than … … 600 600 } 601 601 602 /*---------------------------------------------------------------------------*/ 602 603 603 /** 604 604 * Reset all local items in given state table -
uspace/lib/usbhid/src/hidpath.c
r76fbd9a ra76b01b4 41 41 #include <assert.h> 42 42 43 /*---------------------------------------------------------------------------*/ 43 44 44 /** 45 45 * Compares two usages if they are same or not or one of the usages is not … … 63 63 ((page1 == page2) || (page1 == 0) || (page2 == 0)) 64 64 65 /*---------------------------------------------------------------------------*/ 65 66 66 /** 67 67 * Appends one item (couple of usage_path and usage) into the usage path … … 93 93 } 94 94 95 /*---------------------------------------------------------------------------*/ 95 96 96 /** 97 97 * Removes last item from the usage path structure … … 114 114 } 115 115 116 /*---------------------------------------------------------------------------*/ 116 117 117 /** 118 118 * Nulls last item of the usage path structure. … … 133 133 } 134 134 135 /*---------------------------------------------------------------------------*/ 135 136 136 /** 137 137 * Modifies last item of usage path structure by given usage page or usage … … 164 164 } 165 165 166 /*---------------------------------------------------------------------------*/ 166 167 167 /** 168 168 * … … 188 188 } 189 189 190 /*---------------------------------------------------------------------------*/ 190 191 191 /** 192 192 * Compares two usage paths structures … … 354 354 } 355 355 356 /*---------------------------------------------------------------------------*/ 356 357 357 /** 358 358 * Allocates and initializes new usage path structure. … … 376 376 } 377 377 378 /*---------------------------------------------------------------------------*/ 378 379 379 /** 380 380 * Releases given usage path structure. … … 395 395 } 396 396 397 /*---------------------------------------------------------------------------*/ 397 398 398 /** 399 399 * Clone content of given usage path to the new one … … 441 441 } 442 442 443 /*---------------------------------------------------------------------------*/ 443 444 444 /** 445 445 * Sets report id in usage path structure -
uspace/lib/usbhid/src/hidreport.c
r76fbd9a ra76b01b4 161 161 } 162 162 163 /*----------------------------------------------------------------------------*/ 163 164 164 165 165 int usb_hid_process_report_descriptor(usb_device_t *dev, -
uspace/lib/usbhid/src/hidreq.c
r76fbd9a ra76b01b4 45 45 #include <usb/hid/request.h> 46 46 47 /*----------------------------------------------------------------------------*/ 47 48 48 /** 49 49 * Send Set Report request to the HID device. … … 97 97 } 98 98 99 /*----------------------------------------------------------------------------*/ 99 100 100 /** 101 101 * Send Set Protocol request to the HID device. … … 145 145 } 146 146 147 /*----------------------------------------------------------------------------*/ 147 148 148 /** 149 149 * Send Set Idle request to the HID device. … … 195 195 } 196 196 197 /*----------------------------------------------------------------------------*/ 197 198 198 /** 199 199 * Send Get Report request to the HID device. … … 251 251 } 252 252 253 /*----------------------------------------------------------------------------*/ 253 254 254 /** 255 255 * Send Get Protocol request to the HID device. … … 310 310 } 311 311 312 /*----------------------------------------------------------------------------*/ 312 313 313 /** 314 314 * Send Get Idle request to the HID device. … … 373 373 } 374 374 375 /*----------------------------------------------------------------------------*/ 375 376 376 377 377 /**
Note:
See TracChangeset
for help on using the changeset viewer.