File tree 4 files changed +30
-0
lines changed 4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ rust_binary(
18
18
"src/command/image.rs" ,
19
19
"src/command/load_bitstream.rs" ,
20
20
"src/command/mod.rs" ,
21
+ "src/command/set_pll.rs" ,
21
22
"src/command/spi.rs" ,
22
23
"src/main.rs" ,
23
24
],
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ pub mod hello;
10
10
pub mod i2c;
11
11
pub mod image;
12
12
pub mod load_bitstream;
13
+ pub mod set_pll;
13
14
pub mod spi;
14
15
15
16
use anyhow:: Result ;
Original file line number Diff line number Diff line change
1
+ // Copyright lowRISC contributors.
2
+ // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ use anyhow:: Result ;
6
+ use erased_serde:: Serialize ;
7
+ use std:: any:: Any ;
8
+ use structopt:: StructOpt ;
9
+
10
+ use opentitanlib:: app:: command:: CommandDispatch ;
11
+ use opentitanlib:: app:: TransportWrapper ;
12
+ use opentitanlib:: transport:: cw310;
13
+
14
+ /// Program the CDCE906 PLL chip with defaults.
15
+ #[ derive( Debug , StructOpt ) ]
16
+ pub struct SetPll { }
17
+
18
+ impl CommandDispatch for SetPll {
19
+ fn run (
20
+ & self ,
21
+ _context : & dyn Any ,
22
+ transport : & TransportWrapper ,
23
+ ) -> Result < Option < Box < dyn Serialize > > > {
24
+ log:: info!( "Programming the CDCE906 PLL chip with defaults" ) ;
25
+ Ok ( transport. dispatch ( & cw310:: SetPll { } ) ?)
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ enum RootCommandHierarchy {
30
30
31
31
I2c ( command:: i2c:: I2cCommand ) ,
32
32
Image ( command:: image:: Image ) ,
33
+ SetPll ( command:: set_pll:: SetPll ) ,
33
34
LoadBitstream ( command:: load_bitstream:: LoadBitstream ) ,
34
35
NoOp ( command:: NoOp ) ,
35
36
Spi ( command:: spi:: SpiCommand ) ,
You can’t perform that action at this time.
0 commit comments