Skip to content
Browse files

Added '--modes' option, updated docs.

  • Loading branch information...
1 parent e6717ee commit 5e7d102e20e8be7a120ca3ff005949eec2b0bd86 @piranha32 committed Mar 26, 2012
Showing with 16 additions and 2 deletions.
  1. +16 −2 bbone_pinmux_tool.rb
  2. BIN doc/Pinmux Tool.odt
  3. BIN doc/Pinmux Tool.pdf
View
18 bbone_pinmux_tool.rb
@@ -1230,6 +1230,7 @@ def run_pinmuxing(context)
['--input-file','-i',GetoptLong::REQUIRED_ARGUMENT],
['--output-file','-o',GetoptLong::REQUIRED_ARGUMENT],
['--function','-f',GetoptLong::REQUIRED_ARGUMENT],
+ ['--modes','-m',GetoptLong::REQUIRED_ARGUMENT],
['--name','-n',GetoptLong::REQUIRED_ARGUMENT],
['--run','-r',GetoptLong::NO_ARGUMENT]
)
@@ -1241,6 +1242,7 @@ def run_pinmuxing(context)
output_format=nil
list_name=nil
list_function=nil
+list_modes=nil
do_muxing=false
opts.each do |opt,arg|
@@ -1255,17 +1257,19 @@ def run_pinmuxing(context)
input_file_name=arg
when '--output-file'
output_file_name=arg
+ output_format="binary" if output_format.nil? #output file name provided, set default format if not set already
when '--function'
list_function=arg.downcase
when '--name'
list_name=arg.downcase
+ when '--modes'
+ list_modes=arg.downcase
when '--run'
do_muxing=true
- output_format="none" if output_format.nil?
end
end
-output_format="binary" if output_format.nil?
+output_format="none" if output_format.nil?
current_context=Marshal.load(Marshal.dump(default_context))
@@ -1289,6 +1293,16 @@ def run_pinmuxing(context)
exit
end
+if(!list_modes.nil?)
+ x=find_by_pin_name(list_modes,current_context)
+ x.keys.sort.each do |n|
+ x[n].each do |pi|
+ printf("%s(%s) : %s\n",pi[:name][0],pi[:name][1],pi[:modes].keys.sort.join(', '))
+ end
+ end
+ exit
+end
+
eeprom=nil
case input_format
when 'config'
View
BIN doc/Pinmux Tool.odt
Binary file not shown.
View
BIN doc/Pinmux Tool.pdf
Binary file not shown.

0 comments on commit 5e7d102

Please sign in to comment.
Something went wrong with that request. Please try again.