Changeset 1b20da0 in mainline for uspace/lib/usbhid/include
- Timestamp:
- 2018-02-28T17:52:03Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- Location:
- uspace/lib/usbhid/include/usb/hid
- Files:
-
- 4 edited
-
hid_report_items.h (modified) (11 diffs)
-
hidpath.h (modified) (4 diffs)
-
hidreport.h (modified) (1 diff)
-
hidtypes.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/include/usb/hid/hid_report_items.h
rdf6ded8 r1b20da0 74 74 * Input/Output/Feature Item flags 75 75 */ 76 /** 76 /** 77 77 * Indicates whether the item is data (0) or a constant (1) value. Data 78 78 * indicates the item is defining report fields that contain modifiable device … … 84 84 /** 85 85 * Indicates whether the item creates variable (1) or array (0) data fields in 86 * reports. 86 * reports. 87 87 */ 88 88 #define USB_HID_ITEM_FLAG_VARIABLE(flags) ((flags & 0x2) == 0x2) … … 175 175 /** 176 176 * A Collection item identifies a relationship between two or more data 177 * (Input, Output, or Feature.) 177 * (Input, Output, or Feature.) 178 178 */ 179 179 #define USB_HID_REPORT_TAG_COLLECTION 0xA … … 203 203 #define USB_HID_REPORT_TAG_USAGE_PAGE 0x0 204 204 205 /** 205 /** 206 206 * Extent value in logical units. This is the minimum value that a variable 207 207 * or array item will report. For example, a mouse reporting x position values … … 211 211 #define USB_HID_REPORT_TAG_LOGICAL_MINIMUM 0x1 212 212 213 /** 213 /** 214 214 * Extent value in logical units. This is the maximum value that a variable 215 215 * or array item will report. … … 217 217 #define USB_HID_REPORT_TAG_LOGICAL_MAXIMUM 0x2 218 218 219 /** 219 /** 220 220 * Minimum value for the physical extent of a variable item. This represents 221 221 * the Logical Minimum with units applied to it. … … 223 223 #define USB_HID_REPORT_TAG_PHYSICAL_MINIMUM 0x3 224 224 225 /** 225 /** 226 226 * Maximum value for the physical extent of a variable item. 227 227 */ 228 228 #define USB_HID_REPORT_TAG_PHYSICAL_MAXIMUM 0x4 229 229 230 /** 230 /** 231 231 * Value of the unit exponent in base 10. See the table later in this section 232 232 * for more information. … … 234 234 #define USB_HID_REPORT_TAG_UNIT_EXPONENT 0x5 235 235 236 /** 236 /** 237 237 * Unit values. 238 238 */ 239 239 #define USB_HID_REPORT_TAG_UNIT 0x6 240 240 241 /** 241 /** 242 242 * Unsigned integer specifying the size of the report fields in bits. This 243 243 * allows the parser to build an item map for the report handler to use. … … 245 245 #define USB_HID_REPORT_TAG_REPORT_SIZE 0x7 246 246 247 /** 247 /** 248 248 * Unsigned value that specifies the Report ID. If a Report ID tag is used 249 249 * anywhere in Report descriptor, all data reports for the device are preceded … … 255 255 #define USB_HID_REPORT_TAG_REPORT_ID 0x8 256 256 257 /** 257 /** 258 258 * Unsigned integer specifying the number of data fields for the item; 259 259 * determines how many fields are included in the report for this particular … … 262 262 #define USB_HID_REPORT_TAG_REPORT_COUNT 0x9 263 263 264 /** 264 /** 265 265 * Places a copy of the global item state table on the stack. 266 266 */ 267 267 #define USB_HID_REPORT_TAG_PUSH 0xA 268 268 269 /** 269 /** 270 270 * Replaces the item state table with the top structure from the stack. 271 271 */ -
uspace/lib/usbhid/include/usb/hid/hidpath.h
rdf6ded8 r1b20da0 48 48 */ 49 49 /** Wanted usage path must be exactly the same as the searched one. This 50 * option cannot be combined with the others. 50 * option cannot be combined with the others. 51 51 */ 52 52 #define USB_HID_PATH_COMPARE_STRICT 0 … … 57 57 #define USB_HID_PATH_COMPARE_END 1 58 58 59 /** 59 /** 60 60 * Only usage page are compared along the usage path. This option can be 61 * combined with others. 61 * combined with others. 62 62 */ 63 63 #define USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY 2 64 64 65 /** 65 /** 66 66 * Searched usage page must be prefix of the other one. 67 67 */ 68 68 #define USB_HID_PATH_COMPARE_BEGIN 4 69 69 70 /** 70 /** 71 71 * Searched couple of usage page and usage can be anywhere in usage path. 72 72 * This option is deprecated. … … 75 75 76 76 77 /** 77 /** 78 78 * Item of usage path structure. Last item of linked list describes one item 79 79 * in report, the others describe superior Collection tags. Usage and Usage 80 * page of report item can be changed due to data in report. 80 * page of report item can be changed due to data in report. 81 81 */ 82 82 typedef struct { … … 95 95 96 96 97 /** 97 /** 98 98 * USB HID usage path structure. 99 99 * */ -
uspace/lib/usbhid/include/usb/hid/hidreport.h
rdf6ded8 r1b20da0 53 53 * \retval ENOENT if there are some descriptors missing. 54 54 * \retval ENOMEM if an error with allocation occured. 55 * \retval EINVAL if the Report descriptor's size does not match the size 55 * \retval EINVAL if the Report descriptor's size does not match the size 56 56 * from the interface descriptor. 57 57 * \return Other value inherited from function usb_pipe_start_session(), -
uspace/lib/usbhid/include/usb/hid/hidtypes.h
rdf6ded8 r1b20da0 138 138 139 139 /** 140 * Description of one field/item in report 140 * Description of one field/item in report 141 141 */ 142 142 typedef struct { … … 159 159 usb_hid_report_path_t *collection_path; 160 160 161 /** 161 /** 162 162 * The lowest valid logical value (value with the device operates) 163 163 */ … … 208 208 */ 209 209 typedef struct { 210 /** report id */ 210 /** report id */ 211 211 int32_t id; 212 212 … … 223 223 uint32_t usage_page; 224 224 225 /** Minimum valid usage index */ 225 /** Minimum valid usage index */ 226 226 int32_t usage_minimum; 227 227 228 /** Maximum valid usage index */ 228 /** Maximum valid usage index */ 229 229 int32_t usage_maximum; 230 230 231 /** Minimum valid logical value */ 231 /** Minimum valid logical value */ 232 232 int32_t logical_minimum; 233 233 234 /** Maximum valid logical value */ 234 /** Maximum valid logical value */ 235 235 int32_t logical_maximum; 236 236 237 /** Length of the items in bits*/ 237 /** Length of the items in bits*/ 238 238 int32_t size; 239 239 240 /** COunt of items*/ 240 /** COunt of items*/ 241 241 int32_t count; 242 242 243 /** Bit offset of the item in report */ 243 /** Bit offset of the item in report */ 244 244 size_t offset; 245 245 246 /** Unit exponent */ 246 /** Unit exponent */ 247 247 int32_t unit_exponent; 248 /** Unit of the value */ 248 /** Unit of the value */ 249 249 int32_t unit; 250 250 … … 252 252 uint32_t string_index; 253 253 254 /** Minimum valid string index */ 254 /** Minimum valid string index */ 255 255 uint32_t string_minimum; 256 256 257 /** Maximum valid string index */ 257 /** Maximum valid string index */ 258 258 uint32_t string_maximum; 259 259 260 /** The designator index */ 260 /** The designator index */ 261 261 uint32_t designator_index; 262 262 263 /** Minimum valid designator value*/ 263 /** Minimum valid designator value*/ 264 264 uint32_t designator_minimum; 265 265 266 /** Maximum valid designator value*/ 266 /** Maximum valid designator value*/ 267 267 uint32_t designator_maximum; 268 268 269 /** Minimal valid physical value*/ 269 /** Minimal valid physical value*/ 270 270 int32_t physical_minimum; 271 271 272 /** Maximal valid physical value */ 272 /** Maximal valid physical value */ 273 273 int32_t physical_maximum; 274 274 275 /** Items attributes*/ 275 /** Items attributes*/ 276 276 uint8_t item_flags; 277 277 … … 279 279 usb_hid_report_type_t type; 280 280 281 /** current collection path*/ 281 /** current collection path*/ 282 282 usb_hid_report_path_t *usage_path; 283 283 284 /** Unused*/ 284 /** Unused*/ 285 285 link_t link; 286 286 … … 289 289 290 290 /** 291 * Enum of the keyboard modifiers 291 * Enum of the keyboard modifiers 292 292 */ 293 293 typedef enum { … … 303 303 } usb_hid_modifiers_t; 304 304 305 static const usb_hid_modifiers_t 305 static const usb_hid_modifiers_t 306 306 usb_hid_modifiers_consts[USB_HID_MOD_COUNT] = { 307 307 USB_HID_MOD_LCTRL,
Note:
See TracChangeset
for help on using the changeset viewer.
