File tree Expand file tree Collapse file tree 4 files changed +9
-10
lines changed
stm32cubeprogrammer-cli/src Expand file tree Collapse file tree 4 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ fn main_inner() -> Result<crate::output::Output, anyhow::Error> {
249
249
ProgrammerConnection :: new ( & api, selected_probe, options. protocol . into ( ) ) ;
250
250
251
251
// Connect to the target and add target information to the output
252
- cli_output. add_target_information (
252
+ cli_output. add_general_information (
253
253
programmer_connection
254
254
. connection ( )
255
255
. map_err ( |x| {
@@ -376,7 +376,7 @@ fn main_inner() -> Result<crate::output::Output, anyhow::Error> {
376
376
. start_wireless_stack ( )
377
377
. with_context ( || "Failed to start BLE stack" ) ?;
378
378
379
- output:: CommandOutput :: BleStackInfo ( fus_programmer. fus_info ( ) . clone ( ) )
379
+ output:: CommandOutput :: BleStackInfo ( * fus_programmer. fus_info ( ) )
380
380
}
381
381
parse:: TargetCommand :: Reset ( reset_mode) => {
382
382
log:: info!( "Resetting target: {:?}" , reset_mode) ;
Original file line number Diff line number Diff line change 1
1
use serde:: Serialize ;
2
2
use std:: env:: ArgsOs ;
3
- use stm32cubeprogrammer:: cube_programmer;
4
3
5
4
#[ derive( Debug , Serialize ) ]
6
5
#[ serde( rename_all = "camelCase" ) ]
@@ -42,11 +41,11 @@ impl Output {
42
41
}
43
42
44
43
/// Add information about the connected target
45
- pub fn add_target_information (
44
+ pub fn add_general_information (
46
45
& mut self ,
47
- target_information : & stm32cubeprogrammer:: api_types:: GeneralInformation ,
46
+ general_information : & stm32cubeprogrammer:: api_types:: GeneralInformation ,
48
47
) {
49
- self . general_information = Some ( target_information . clone ( ) ) ;
48
+ self . general_information = Some ( general_information . clone ( ) ) ;
50
49
}
51
50
52
51
/// Add list of connected probes
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ let connected = programmer
29
29
. connect_to_target (& probes [0 ], & Protocol :: Swd , & ConnectionParameters :: default ())
30
30
. expect (" Failed to connect to target" );
31
31
32
- println! (" Target information: {}" , connected . target_information ());
32
+ println! (" Target information: {}" , connected . general_information ());
33
33
34
34
// If there are multiple connected probes with a target, you can establish multiple connections simultaneously
35
35
let connected_other = programmer
36
36
. connect_to_target (& probes [1 ], & Protocol :: Swd , & ConnectionParameters :: default ())
37
37
. expect (" Failed to connect to target" );
38
38
39
- println! (" Other target information: {}" , connected_other . target_information ());
39
+ println! (" Other target information: {}" , connected_other . general_information ());
40
40
41
41
connected
42
42
. reset_target (ResetMode :: Hardware )
Original file line number Diff line number Diff line change 27
27
//! .connect_to_target(&probes[0], &Protocol::Swd, &ConnectionParameters::default())
28
28
//! .expect("Failed to connect to target");
29
29
//!
30
- //! println!("Target information: {}", connected.target_information ());
30
+ //! println!("Target information: {}", connected.general_information ());
31
31
//!
32
32
//! // If there are multiple connected probes with a target, you can establish multiple connections simultaneously
33
33
//! let connected_other = programmer
34
34
//! .connect_to_target(&probes[1], &Protocol::Swd, &ConnectionParameters::default())
35
35
//! .expect("Failed to connect to target");
36
36
//!
37
- //! println!("Other target information: {}", connected_other.target_information ());
37
+ //! println!("Other target information: {}", connected_other.general_information ());
38
38
//!
39
39
//! connected
40
40
//! .reset_target(ResetMode::Hardware)
You can’t perform that action at this time.
0 commit comments