sftool-lib 0.2.3

SiFli SoC serial utility library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Result;
use crate::common::ram_command::{Command, RamCommand};

/// 通用的复位操作实现
pub struct ResetOps;

impl ResetOps {
    /// 发送软件复位命令
    pub fn soft_reset<T>(tool: &mut T) -> Result<()>
    where
        T: RamCommand,
    {
        tool.command(Command::SoftReset)?;
        Ok(())
    }
}