From 900df7b223c9ddc751150ea0e42e68cc24de802d Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 19 Jul 2022 03:16:51 +0800 Subject: [PATCH] add testing feature for rekey in hosted mode to LLIO (dna swap) --- services/llio/Cargo.toml | 1 + services/llio/src/llio_hosted.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/services/llio/Cargo.toml b/services/llio/Cargo.toml index d622dfcce..ac4cf78ef 100644 --- a/services/llio/Cargo.toml +++ b/services/llio/Cargo.toml @@ -38,5 +38,6 @@ chrono = "0.4.19" debugprint = [] wfi_off = [] # useful for serial port debugging, forces power on so the UART characters can finish printing tts = [] +test-rekey = [] default = [] # "debugprint" #default = ["debugprint"] # , "fccagent" diff --git a/services/llio/src/llio_hosted.rs b/services/llio/src/llio_hosted.rs index d8eea5e7b..9356e0749 100644 --- a/services/llio/src/llio_hosted.rs +++ b/services/llio/src/llio_hosted.rs @@ -21,6 +21,9 @@ impl Llio { pub fn gpio_int_pending(&self, ) -> u32 { 0x0 } pub fn gpio_int_ena(&self, _d: u32) {} pub fn set_uart_mux(&self, _mux: UartType) {} + #[cfg(feature="test-rekey")] + pub fn get_info_dna(&self, ) -> (usize, usize) { (0, 1) } + #[cfg(not(feature="test-rekey"))] pub fn get_info_dna(&self, ) -> (usize, usize) { (0, 0) } pub fn get_info_git(&self, ) -> (usize, usize) { (0, 0) } pub fn get_info_platform(&self, ) -> (usize, usize) { (0, 0) }