@@ -12,6 +12,7 @@ use svdtools::{
1212enum Command {
1313 /// Patches an SVD file as specified by a YAML file
1414 Patch {
15+ /// Path to input SVD file
1516 #[ clap( parse( from_os_str) ) ]
1617 svd_file : PathBuf ,
1718 } ,
@@ -27,6 +28,7 @@ enum Command {
2728 } ,
2829 /// Print list of all interrupts described by an SVD file
2930 Interrupts {
31+ /// Path to input SVD file
3032 #[ clap( parse( from_os_str) ) ]
3133 svd_file : PathBuf ,
3234
@@ -36,19 +38,35 @@ enum Command {
3638 } ,
3739 /// Generate text-based memory map of an SVD file.
3840 Mmap {
41+ /// Path to input SVD file
3942 #[ clap( parse( from_os_str) ) ]
4043 svd_file : PathBuf ,
4144 } ,
4245 /// Convert SVD representation between file formats
4346 Convert {
47+ /// Path to input file
4448 #[ clap( parse( from_os_str) ) ]
4549 in_path : PathBuf ,
50+
51+ /// Path to output file
4652 #[ clap( parse( from_os_str) ) ]
4753 out_path : PathBuf ,
54+
55+ /// Format of input file (XML, JSON or YAML)
4856 #[ clap( long = "input-format" ) ]
4957 input_format : Option < convert_cli:: InputFormat > ,
58+
59+ /// Format of output file (XML, JSON or YAML)
5060 #[ clap( long = "output-format" ) ]
5161 output_format : Option < convert_cli:: OutputFormat > ,
62+
63+ /// Expand arrays, clusters and derived values
64+ #[ clap( long) ]
65+ expand : bool ,
66+
67+ /// Skip enumeratedValues and writeConstraints during parsing (XML input only)
68+ #[ clap( long) ]
69+ ignore_enums : bool ,
5270 } ,
5371}
5472
@@ -69,7 +87,16 @@ impl Command {
6987 out_path,
7088 input_format,
7189 output_format,
72- } => convert_cli:: convert ( in_path, out_path, * input_format, * output_format) ?,
90+ expand,
91+ ignore_enums,
92+ } => convert_cli:: convert (
93+ in_path,
94+ out_path,
95+ * input_format,
96+ * output_format,
97+ * expand,
98+ * ignore_enums,
99+ ) ?,
73100 }
74101 Ok ( ( ) )
75102 }
0 commit comments