Add `::system_version_bytes()` for uniformity

Other functions will return bytes, so it's weird to only be able to get
the version as a string.
This commit is contained in:
Leonora Tindall 2019-12-29 12:56:44 -08:00
parent dd2102d973
commit 6318251226
Signed by: nora
GPG Key ID: 7A8B52EC67E09AAF
2 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased - v0.2.0
### Added
- `Rn2903::system_version_bytes()`
### Changed

View File

@ -286,4 +286,11 @@ impl Rn2903 {
let bytes = self.transact(b"sys get ver")?;
Ok(bytes_to_string(&bytes))
}
/// Queries the module for its firmware version information.
///
/// As `::system_version()`, but returns bytes.
pub fn system_version_bytes(&mut self) -> Result<Vec<u8>> {
self.transact(b"sys get ver")
}
}