tools/ec_list.pl
author Florian Pose <fp@igh-essen.com>
Tue, 11 Apr 2006 12:54:01 +0000
changeset 186 644a053fe103
child 188 c0e49f4a1c07
permissions -rw-r--r--
ec_list tool for listing the bus in user space
186
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#!/usr/bin/perl
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
#  e c _ l i s t . p l
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
#  Userspace tool for listing EtherCAT slaves.
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
#  $Id: slave.c 340 2006-04-11 10:17:30Z fp $
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
#
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
use strict;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
use Getopt::Std;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
my $master_index;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
my $master_dir;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
&get_options;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
&query_master;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
exit 0;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
sub query_master
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
{
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
    $master_dir = "/sys/ethercat" . $master_index;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
    &query_slaves;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
sub query_slaves
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
{
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
    my $dirhandle;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
    my $slave_dir;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
    my $entry;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
    my $slave_index;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
    my $file_name;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
    my $vendor_name;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
    my @slaves;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
    my $slave;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
    unless (opendir $dirhandle, $master_dir) {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
	print "Failed to open directory \"$master_dir\".\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
	exit 1;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
    while ($entry = readdir $dirhandle) {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
        next unless $entry =~ /^slave(\d+)$/;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
	$slave_dir = $master_dir . "/" . $entry;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    54
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
	$slave = {};
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    56
	$slave->{'ring_position'} =
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
	    &read_integer("$slave_dir/ring_position");
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
	$slave->{'station_address'} =
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
	    &read_integer("$slave_dir/station_address");
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    60
	$slave->{'vendor_name'} =
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    61
	    &read_string("$slave_dir/vendor_name");
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
	$slave->{'product_name'} =
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    63
	    &read_string("$slave_dir/product_name");
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    64
	$slave->{'product_desc'} =
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    65
	    &read_string("$slave_dir/product_desc");
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    66
	$slave->{'type'} =
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    67
	    &read_string("$slave_dir/type");
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    68
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    69
	push @slaves, $slave;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    70
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    71
    closedir $dirhandle;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    72
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
    @slaves = sort { $a->{'ring_position'} <=> $b->{'ring_position'} } @slaves;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    74
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
    my $coupler_index = -1;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    76
    my $slave_index = 0;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    77
    my $abs;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    78
    my $rel;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    79
    print "EtherCAT bus listing for master $master_index:\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
    for $slave (@slaves) {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    81
	if ($slave->{'type'} eq "coupler") {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    82
	    print "--------------------------------------------------------\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    83
	    $coupler_index++;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    84
	    $slave_index = 0;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    85
	}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    86
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    87
	$abs = sprintf "%i", $slave->{'ring_position'};
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    88
	$rel = sprintf "%i:%i", $coupler_index, $slave_index;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    89
	printf("%4s %6s   %-15s %-15s %-15s\n", $abs, $rel,
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    90
	       $slave->{'vendor_name'}, $slave->{'product_name'},
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    91
	       $slave->{'product_desc'});
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    92
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    93
	if ($slave->{'type'} eq "coupler") {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    94
	    print "--------------------------------------------------------\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    95
	}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    96
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    97
	$slave_index++;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    98
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    99
    print "--------------------------------------------------------\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   100
}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   101
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   102
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   103
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   104
sub read_string
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   105
{
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   106
    (my $file_name) = @_;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   107
    my $data;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   108
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   109
    $data = `cat $file_name 2>/dev/null`;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   110
    if ($?) {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   111
	print "ERROR: Unable to read string $file_name!\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   112
	exit 1;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   113
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   114
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   115
    chomp $data;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   116
    return $data;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   117
}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   118
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   119
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   120
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   121
sub read_integer
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   122
{
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   123
    (my $file_name) = @_;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   124
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   125
    if (`cat $file_name 2>/dev/null` !~ /^(\d+)$/) {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   126
	print "ERROR: Unable to read integer $file_name!\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   127
	exit 1;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   128
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   129
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   130
    return int $1;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   131
}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   132
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   133
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   134
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   135
sub get_options
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   136
{
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   137
    my %opt;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   138
    my $optret;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   139
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   140
    $optret = getopts "m:h", \%opt;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   141
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   142
    &print_usage if defined $opt{'h'} or $#ARGV > -1;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   143
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   144
    if (defined $opt{'m'}) {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   145
	$master_index = $opt{'m'};
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   146
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   147
    else {
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   148
	$master_index = 0;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   149
    }
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   150
}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   151
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   152
#------------------------------------------------------------------------------
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   153
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   154
sub print_usage
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   155
{
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   156
    print "Usage: ec_list [OPTIONS]\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   157
    print "        -m <IDX>    Query master IDX.\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   158
    print "        -h          Show this help.\n";
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   159
    exit 0;
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   160
}
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   161
644a053fe103 ec_list tool for listing the bus in user space
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   162
#------------------------------------------------------------------------------