Browse Source

feat: WCH-LinkW support

pull/28/head
Andelf 1 year ago
parent
commit
d4c3881188
  1. 4
      CHANGELOG.md
  2. 13
      README.md
  3. 8
      src/lib.rs

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Support WCH-LinkW, a CH32V208 flasher with wireless connection
## [0.0.4] - 2023-07-01
### Added

13
README.md

@ -15,12 +15,22 @@
**NOTE**: This tool is still in development and not ready for production use.
## Feature Support
- [x] Flash firmware
- [x] Reset chip
- [x] Read chip info
- [x] Read chip memory
- [x] Read chip register
## Tested On
### Probes
- WCH-Link [CH549]
- WCH-Link [CH549] - the first version, reflash required when switching mode
- WCH-LinkE [CH32V305][CH32V307]
- [ ] WCH-Link? [CH32V203][CH32V203]
- [ ] WCH-Link? [CH32V208][CH32V308] - wireless version
[CH549]: http://www.wch-ic.com/products/CH549.html
@ -35,6 +45,7 @@
[CH32V003]: http://www.wch-ic.com/products/CH32V003.html
[CH32V103]: http://www.wch-ic.com/products/CH32V103.html
[CH32V203]: http://www.wch-ic.com/products/CH32V203.html
[CH32V308]: http://www.wch-ic.com/products/CH32V208.html
[CH32V307]: http://www.wch-ic.com/products/CH32V307.html
## Install

8
src/lib.rs

@ -21,7 +21,9 @@ pub enum WchLinkVariant {
ECh32v305 = 2,
/// WCH-LinkS-CH32V203
SCh32v203 = 3,
/// WCH-LinkB,
/// WCH-LinkW-CH32V208
WCh32v208 = 5,
/// WCH-LinkB, CH32V203
B = 4,
}
@ -32,7 +34,8 @@ impl WchLinkVariant {
2 => Ok(Self::ECh32v305),
3 => Ok(Self::SCh32v203),
4 => Ok(Self::B),
18 => Ok(Self::ECh32v305),
5 => Ok(Self::WCh32v208),
0x12 => Ok(Self::ECh32v305),
_ => Err(Error::UnknownLinkVariant(value)),
}
}
@ -44,6 +47,7 @@ impl fmt::Display for WchLinkVariant {
WchLinkVariant::Ch549 => write!(f, "WCH-Link-CH549"),
WchLinkVariant::ECh32v305 => write!(f, "WCH-LinkE-CH32V305"),
WchLinkVariant::SCh32v203 => write!(f, "WCH-LinkS-CH32V203"),
WchLinkVariant::WCh32v208 => write!(f, "WCH-LinkW-CH32V208"),
WchLinkVariant::B => write!(f, "WCH-LinkB"),
}
}

Loading…
Cancel
Save