Changeset 25935f1e in mainline
- Timestamp:
- 2017-12-18T09:34:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fc338e0
- Parents:
- 17f8abc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tmon/main.c
r17f8abc r25935f1e 40 40 #define NAME "tmon" 41 41 42 static void print_usage(char *app_name)42 static int fallback(int argc, char *argv[]) 43 43 { 44 printf(NAME ": hello USB transfers!\n\n"); 44 // FIXME 45 printf(NAME ": Not implemented, lol!\n"); 46 return 1; 45 47 } 46 48 47 49 typedef struct { 48 50 const char *name; 51 const char *description; 49 52 int (*action)(int, char **); 50 53 } usb_diag_cmd_t; … … 53 56 { 54 57 .name = "list", 58 .description = "Print a list of connected diagnostic devices.", 55 59 .action = tmon_list, 56 60 }, 57 61 { 58 62 .name = "test-bulk", 63 .description = "Benchmark bulk endpoints of a diagnostic device.", 59 64 .action = tmon_test_bulk, 65 }, 66 { 67 .name = "test-intr", 68 .description = "Benchmark interrupt endpoints of a diagnostic device.", 69 .action = fallback, 70 }, 71 { 72 .name = "test-isoch", 73 .description = "Benchmark isochronous endpoints of a diagnostic device.", 74 .action = fallback, 60 75 }, 61 76 { … … 63 78 } 64 79 }; 80 81 static void print_usage(char *app_name) 82 { 83 printf(NAME ": benchmark USB diagnostic device\n\n"); 84 85 printf("Usage: %s command [options] [device]\n", app_name); 86 printf("Available commands:\n"); 87 for (int i = 0; commands[i].name; ++i) { 88 printf(" %s - %s\n", commands[i].name, commands[i].description); 89 } 90 91 // TODO: Print options. 92 93 printf("\nIf no device is specified, the first device is used provided that no other device is connected.\n\n"); 94 } 65 95 66 96 int main(int argc, char *argv[])
Note:
See TracChangeset
for help on using the changeset viewer.