Changeset 8a121b1 in mainline for uspace/app
- Timestamp:
- 2011-10-15T11:58:16Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c95d6f5
- Parents:
- 2a5b62b
- Location:
- uspace/app/usbinfo
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/desctree.c
r2a5b62b r8a121b1 50 50 51 51 static void browse_descriptor_tree_internal(usb_dp_parser_t *parser, 52 usb_dp_parser_data_t *data, uint8_t *root, size_t depth,52 usb_dp_parser_data_t *data, const uint8_t *root, size_t depth, 53 53 dump_descriptor_in_tree_t callback, void *arg) 54 54 { … … 57 57 } 58 58 callback(root, depth, arg); 59 uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root);59 const uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root); 60 60 do { 61 61 browse_descriptor_tree_internal(parser, data, child, depth + 1, -
uspace/app/usbinfo/dump.c
r2a5b62b r8a121b1 110 110 } 111 111 112 static void dump_tree_descriptor( uint8_t *descriptor, size_t depth)112 static void dump_tree_descriptor(const uint8_t *descriptor, size_t depth) 113 113 { 114 114 if (descriptor == NULL) { 115 115 return; 116 116 } 117 int type = (int) *(descriptor + 1);117 int type = descriptor[1]; 118 118 const char *name = "unknown"; 119 119 switch (type) { … … 136 136 } 137 137 138 static void dump_tree_internal(usb_dp_parser_t *parser, usb_dp_parser_data_t *data, 139 uint8_t *root, size_t depth) 138 static void dump_tree_internal( 139 usb_dp_parser_t *parser, usb_dp_parser_data_t *data, 140 const uint8_t *root, size_t depth) 140 141 { 141 142 if (root == NULL) { … … 143 144 } 144 145 dump_tree_descriptor(root, depth); 145 uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root);146 const uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root); 146 147 do { 147 148 dump_tree_internal(parser, data, child, depth + 1); -
uspace/app/usbinfo/hid.c
r2a5b62b r8a121b1 55 55 } descriptor_walk_context_t; 56 56 57 static bool is_descriptor_kind( uint8_t *d, usb_descriptor_type_t t)57 static bool is_descriptor_kind(const uint8_t *d, usb_descriptor_type_t t) 58 58 { 59 59 if (d == NULL) { … … 180 180 * @param arg Custom argument, passed as descriptor_walk_context_t. 181 181 */ 182 static void descriptor_walk_callback( uint8_t *raw_descriptor,182 static void descriptor_walk_callback(const uint8_t *raw_descriptor, 183 183 size_t depth, void *arg) 184 184 { -
uspace/app/usbinfo/info.c
r2a5b62b r8a121b1 51 51 } 52 52 53 static void dump_match_ids_from_interface( uint8_t *descriptor, size_t depth,54 void *arg)53 static void dump_match_ids_from_interface( 54 const uint8_t *descriptor, size_t depth, void *arg) 55 55 { 56 56 if (depth != 1) { … … 165 165 166 166 167 static void dump_descriptor_tree_callback( uint8_t *descriptor,168 size_t depth, void *arg)167 static void dump_descriptor_tree_callback( 168 const uint8_t *descriptor, size_t depth, void *arg) 169 169 { 170 170 const char *indent = get_indent(depth + 1); … … 246 246 } 247 247 248 static void find_string_indexes_callback( uint8_t *descriptor,249 size_t depth, void *arg)248 static void find_string_indexes_callback( 249 const uint8_t *descriptor, size_t depth, void *arg) 250 250 { 251 251 size_t descriptor_length = descriptor[0]; -
uspace/app/usbinfo/usbinfo.h
r2a5b62b r8a121b1 74 74 void destroy_device(usbinfo_device_t *); 75 75 76 typedef void (*dump_descriptor_in_tree_t)( uint8_t *, size_t, void *);76 typedef void (*dump_descriptor_in_tree_t)(const uint8_t *, size_t, void *); 77 77 void browse_descriptor_tree(uint8_t *, size_t, usb_dp_descriptor_nesting_t *, 78 78 dump_descriptor_in_tree_t, size_t, void *);
Note:
See TracChangeset
for help on using the changeset viewer.
