sftool_lib/common/
reset.rs

1use crate::common::ram_command::{Command, RamCommand};
2
3/// 通用的复位操作实现
4pub struct ResetOps;
5
6impl ResetOps {
7    /// 发送软件复位命令
8    pub fn soft_reset<T>(tool: &mut T) -> Result<(), std::io::Error>
9    where
10        T: RamCommand,
11    {
12        tool.command(Command::SoftReset)?;
13        Ok(())
14    }
15}