@@ -3,8 +3,8 @@ use clap::Parser;
33use std:: path:: PathBuf ;
44
55use svdtools:: {
6- convert:: convert_cli, interrupts :: interrupts_cli , makedeps :: makedeps_cli , mmap :: mmap_cli ,
7- patch:: patch_cli,
6+ convert:: convert_cli, html :: html_cli , html :: htmlcompare_cli , interrupts :: interrupts_cli ,
7+ makedeps :: makedeps_cli , mmap :: mmap_cli , patch:: patch_cli,
88} ;
99
1010#[ derive( Parser , Debug ) ]
@@ -82,6 +82,23 @@ enum Command {
8282 #[ clap( long) ]
8383 format_config : Option < PathBuf > ,
8484 } ,
85+ /// Generates webpage with tables of existing peripherals
86+ Htmlcompare {
87+ /// Path to write HTML files to
88+ htmldir : PathBuf ,
89+
90+ /// Input SVD XML files
91+ svdfiles : Vec < PathBuf > ,
92+ } ,
93+ /// Generates a webpage for a given SVD file containing details on every
94+ /// peripheral and register and their level of coverage.
95+ Html {
96+ /// Path to write HTML files to
97+ htmldir : PathBuf ,
98+
99+ /// Path to patched SVD files
100+ svdfiles : Vec < PathBuf > ,
101+ } ,
85102}
86103
87104impl Command {
@@ -123,6 +140,12 @@ impl Command {
123140 } ,
124141 format_config. as_ref ( ) . map ( |p| p. as_path ( ) ) ,
125142 ) ?,
143+ Self :: Htmlcompare { htmldir, svdfiles } => {
144+ htmlcompare_cli:: htmlcompare ( htmldir, svdfiles) ?;
145+ }
146+ Self :: Html { htmldir, svdfiles } => {
147+ html_cli:: svd2html ( htmldir, svdfiles) ?;
148+ }
126149 }
127150 Ok ( ( ) )
128151 }
0 commit comments