uds_client/uds_client/services/
ecu_reset.rs1use crate::{
5 socket_can::CanSocketTx,
6 uds_client::{DiagError, PciByte, UdsClient},
7};
8use automotive_diag::uds::UdsCommand;
9
10#[allow(dead_code)]
11impl<T: CanSocketTx> UdsClient<'_, T> {
12 pub async fn uds_reset_ecu(&mut self) -> Result<(), DiagError> {
16 dbg!("UDS: send reset ECU");
17 let pci_byte = PciByte::new(crate::uds_client::PciType::SingleFrame, 2);
18 self.send_command_with_response(pci_byte, UdsCommand::ECUReset, &[])
19 .await?;
20 Ok(())
21 }
22}