Skip to content

Commit 64d8818

Browse files
committed
fix: linux not building
1 parent 1b9d6ca commit 64d8818

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

stm32cubeprogrammer-cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ fn main_inner() -> Result<crate::output::Output, anyhow::Error> {
249249
ProgrammerConnection::new(&api, selected_probe, options.protocol.into());
250250

251251
// Connect to the target and add target information to the output
252-
cli_output.add_target_information(
252+
cli_output.add_general_information(
253253
programmer_connection
254254
.connection()
255255
.map_err(|x| {
@@ -376,7 +376,7 @@ fn main_inner() -> Result<crate::output::Output, anyhow::Error> {
376376
.start_wireless_stack()
377377
.with_context(|| "Failed to start BLE stack")?;
378378

379-
output::CommandOutput::BleStackInfo(fus_programmer.fus_info().clone())
379+
output::CommandOutput::BleStackInfo(*fus_programmer.fus_info())
380380
}
381381
parse::TargetCommand::Reset(reset_mode) => {
382382
log::info!("Resetting target: {:?}", reset_mode);

stm32cubeprogrammer-cli/src/output.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use serde::Serialize;
22
use std::env::ArgsOs;
3-
use stm32cubeprogrammer::cube_programmer;
43

54
#[derive(Debug, Serialize)]
65
#[serde(rename_all = "camelCase")]
@@ -42,11 +41,11 @@ impl Output {
4241
}
4342

4443
/// Add information about the connected target
45-
pub fn add_target_information(
44+
pub fn add_general_information(
4645
&mut self,
47-
target_information: &stm32cubeprogrammer::api_types::GeneralInformation,
46+
general_information: &stm32cubeprogrammer::api_types::GeneralInformation,
4847
) {
49-
self.general_information = Some(target_information.clone());
48+
self.general_information = Some(general_information.clone());
5049
}
5150

5251
/// Add list of connected probes

stm32cubeprogrammer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ let connected = programmer
2929
.connect_to_target(&probes[0], &Protocol::Swd, &ConnectionParameters::default())
3030
.expect("Failed to connect to target");
3131

32-
println!("Target information: {}", connected.target_information());
32+
println!("Target information: {}", connected.general_information());
3333

3434
// If there are multiple connected probes with a target, you can establish multiple connections simultaneously
3535
let connected_other = programmer
3636
.connect_to_target(&probes[1], &Protocol::Swd, &ConnectionParameters::default())
3737
.expect("Failed to connect to target");
3838

39-
println!("Other target information: {}", connected_other.target_information());
39+
println!("Other target information: {}", connected_other.general_information());
4040

4141
connected
4242
.reset_target(ResetMode::Hardware)

stm32cubeprogrammer/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
//! .connect_to_target(&probes[0], &Protocol::Swd, &ConnectionParameters::default())
2828
//! .expect("Failed to connect to target");
2929
//!
30-
//! println!("Target information: {}", connected.target_information());
30+
//! println!("Target information: {}", connected.general_information());
3131
//!
3232
//! // If there are multiple connected probes with a target, you can establish multiple connections simultaneously
3333
//! let connected_other = programmer
3434
//! .connect_to_target(&probes[1], &Protocol::Swd, &ConnectionParameters::default())
3535
//! .expect("Failed to connect to target");
3636
//!
37-
//! println!("Other target information: {}", connected_other.target_information());
37+
//! println!("Other target information: {}", connected_other.general_information());
3838
//!
3939
//! connected
4040
//! .reset_target(ResetMode::Hardware)

0 commit comments

Comments
 (0)