Skip to content

Commit

Permalink
refactor: add new dmi algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Oct 7, 2023
1 parent c4c9b20 commit 43e8935
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 56 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Regression in `flash` command
- Use chip type from the protocol, close #25
- Support 2.10 (aka. v30) firmware, close #27
- Fix `--no-detach` option is not working
- Use DMI to read memory, avoid using probe commands

### Changed

Expand Down
8 changes: 3 additions & 5 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,17 @@ impl Command for Reset {

/// Speed settings
#[derive(Debug, Copy, Clone, clap::ValueEnum, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Default)]
pub enum Speed {
/// 400kHz
Low = 0x03,
/// 4000kHz
Medium = 0x02,
/// 6000kHz
#[default]
High = 0x01,
}
impl Default for Speed {
fn default() -> Self {
Speed::High
}
}


/// Set CLK Speed, 0x0C
#[derive(Debug)]
Expand Down
Loading

0 comments on commit 43e8935

Please sign in to comment.