mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add version with SemVer output for Xous
This commit is contained in:
parent
bfb93269f3
commit
322941c4ae
2 changed files with 5 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ num-derive = {version = "0.3.3", default-features = false}
|
|||
num-traits = {version = "0.2.14", default-features = false}
|
||||
susres = {path = "../susres"}
|
||||
xous-names = {path = "../xous-names"}
|
||||
xous-semver = "0.1.2"
|
||||
|
||||
[target.'cfg(not(any(windows,unix)))'.dependencies]
|
||||
utralib = {path = "../../utralib"}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ pub mod api;
|
|||
|
||||
use num_traits::ToPrimitive;
|
||||
use xous::{send_message, Error, CID};
|
||||
use xous_semver::SemVer;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Ticktimer {
|
||||
|
|
@ -73,6 +74,9 @@ impl Ticktimer {
|
|||
.expect("couldn't revert buffer");
|
||||
String::from(v.version.as_str().unwrap())
|
||||
}
|
||||
pub fn get_version_semver(&self) -> SemVer {
|
||||
SemVer::from_str(self.get_version().lines().next().unwrap()).unwrap()
|
||||
}
|
||||
|
||||
/// Lock the given Mutex. Blocks until the Mutex is locked.
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue