mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
build a hosted mode dummy for aqcuire qr
This commit is contained in:
parent
b88f6cad91
commit
720680a931
2 changed files with 7 additions and 1 deletions
|
|
@ -129,7 +129,6 @@ impl BulkRead {
|
|||
pub fn default() -> BulkRead { BulkRead { buf: [0; 7936], from_offset: 0, len: 7936 } }
|
||||
}
|
||||
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)]
|
||||
pub struct QrAcquisition {
|
||||
pub content: Option<String>,
|
||||
|
|
|
|||
|
|
@ -737,6 +737,13 @@ impl Gfx {
|
|||
let response: QrAcquisition = buf.to_original()?;
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
#[cfg(feature = "hosted-baosec")]
|
||||
pub fn acquire_qr(&self) -> Result<QrAcquisition, xous::Error> {
|
||||
let dummy = "otpauth://totp/ACME%20Co:john.doe@email.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30".to_string();
|
||||
// just return some dummy data
|
||||
Ok(QrAcquisition { content: Some(dummy), meta: None })
|
||||
}
|
||||
}
|
||||
|
||||
use core::sync::atomic::{AtomicU32, Ordering};
|
||||
|
|
|
|||
Loading…
Reference in a new issue