#define BUFFER_SIZE 4096
+static const char trb_i2c_version[] = "$Revision: 1.3 $";
+
static const uint16_t trb_i2c_register = 0x8040;
static const unsigned int timeout = 1000;
printf("Options:\n");
printf(" -h give this help\n");
printf(" -d turn on Debugging Information\n");
+ printf(" -V Version number\n");
printf("\nCommands:\n");
printf(" w <trb_address> <chip> <register> <value> -> "
"write <value> to <register>\n");
trb_lazy = 0;
/* Parse Arguments */
- while ((i = getopt(argc, argv, "+hd:")) != -1) {
+ while ((i = getopt(argc, argv, "+hd:V")) != -1) {
switch (i) {
case '?':
usage(basename(argv[0]));
case 'd':
trb_debug = strtoul(optarg, NULL, 0);
break;
+ case 'V':
+ printf("%s %s, using libtrbnet %s\n",
+ basename(argv[0]), trb_i2c_version, trbnet_version);
+ exit(EXIT_SUCCESS);
+ break;
default:
break;
}