Changeset 00aece0 in mainline for uspace/drv/bus/usb/usbmid/dump.c
- Timestamp:
- 2012-02-18T16:47:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4449c6c
- Parents:
- bd5f3b7 (diff), f943dd3 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmid/dump.c
rbd5f3b7 r00aece0 47 47 * @param depth Nesting depth. 48 48 */ 49 static void dump_tree_descriptor( uint8_t *data, size_t depth)49 static void dump_tree_descriptor(const uint8_t *data, size_t depth) 50 50 { 51 51 if (data == NULL) { 52 52 return; 53 53 } 54 int type = (int) *(data + 1);54 const int type = data[1]; 55 55 if (type == USB_DESCTYPE_INTERFACE) { 56 56 usb_standard_interface_descriptor_t *descriptor … … 71 71 * @param depth Nesting depth. 72 72 */ 73 static void dump_tree_internal(usb_dp_parser_t *parser, usb_dp_parser_data_t *data, 74 uint8_t *root, size_t depth) 73 static void dump_tree_internal( 74 usb_dp_parser_t *parser, usb_dp_parser_data_t *data, 75 const uint8_t *root, size_t depth) 75 76 { 76 77 if (root == NULL) { … … 78 79 } 79 80 dump_tree_descriptor(root, depth); 80 uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root);81 const uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root); 81 82 do { 82 83 dump_tree_internal(parser, data, child, depth + 1); … … 92 93 static void dump_tree(usb_dp_parser_t *parser, usb_dp_parser_data_t *data) 93 94 { 94 uint8_t *ptr = data->data;95 const uint8_t *ptr = data->data; 95 96 dump_tree_internal(parser, data, ptr, 0); 96 97 }
Note:
See TracChangeset
for help on using the changeset viewer.