From 29f83160c524da5262dd9c3a8f08d3f287b09c5d Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Mon, 1 Jan 2024 21:30:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E5=8E=9F=E8=A3=85=E7=9A=84dapl?= =?UTF-8?q?ink=E4=B8=8A=E8=87=AA=E5=8A=A8=E5=A4=8D=E4=BD=8D=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/peripheral/general_uart.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aec6d3a..78497eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "AirISP-next" -version = "0.1.4" +version = "0.1.5" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index eaac2bb..997d450 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "AirISP-next" -version = "0.1.4" +version = "0.1.5" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/peripheral/general_uart.rs b/src/peripheral/general_uart.rs index 9a6e27e..226cea9 100644 --- a/src/peripheral/general_uart.rs +++ b/src/peripheral/general_uart.rs @@ -398,18 +398,21 @@ impl Pp for GeneralUart<'_> { // 硬件复位 "hard_reset" => { match self.air_isp.get_before().as_str() { - // 使用异或电路 "direct_connect" => { self.handle.write_request_to_send(true).unwrap(); self.handle.write_data_terminal_ready(true).unwrap(); std::thread::sleep(Duration::from_millis(20)); self.handle.write_request_to_send(false).unwrap(); + self.handle.write_data_terminal_ready(true).unwrap(); }, + // 使用异或电路 "default_reset" | _ => { self.handle.write_request_to_send(true).unwrap(); + self.handle.write_data_terminal_ready(false).unwrap(); std::thread::sleep(Duration::from_millis(20)); self.handle.write_request_to_send(false).unwrap(); + self.handle.write_data_terminal_ready(false).unwrap(); } }