File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ hosted-baosec = [
50
50
" cramium-hal/hosted-baosec" ,
51
51
]
52
52
usb = []
53
- pddbtest = []
53
+ battery-readout = []
54
+ with-pddb = []
55
+ pddbtest = [" with-pddb" ]
54
56
test-rekey = []
55
57
autobasis = [" rand_chacha" , " rand" ]
56
58
modal-testing = [" ux-api" , " modals/modal-testing" ]
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ use trng_cmd::*;
87
87
mod usb;
88
88
#[ cfg( feature = "usb" ) ]
89
89
use usb:: * ;
90
+ #[ cfg( feature = "with-pddb" ) ]
90
91
mod pddb;
92
+ #[ cfg( feature = "with-pddb" ) ]
91
93
use pddb:: * ;
92
94
93
95
pub struct CmdEnv {
@@ -97,6 +99,7 @@ pub struct CmdEnv {
97
99
trng_cmd : TrngCmd ,
98
100
#[ cfg( feature = "usb" ) ]
99
101
usb : Usb ,
102
+ #[ cfg( feature = "with-pddb" ) ]
100
103
pddb_cmd : PddbCmd ,
101
104
}
102
105
impl CmdEnv {
@@ -120,6 +123,7 @@ impl CmdEnv {
120
123
} ,
121
124
#[ cfg( feature = "usb" ) ]
122
125
usb : Usb :: new ( ) ,
126
+ #[ cfg( feature = "with-pddb" ) ]
123
127
pddb_cmd : PddbCmd :: new ( ) ,
124
128
}
125
129
}
@@ -142,6 +146,7 @@ impl CmdEnv {
142
146
& mut console_cmd,
143
147
#[ cfg( feature = "usb" ) ]
144
148
& mut self . usb ,
149
+ #[ cfg( feature = "with-pddb" ) ]
145
150
& mut self . pddb_cmd ,
146
151
] ;
147
152
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ fn main() {
108
108
modals:: tests:: spawn_test ( ) ;
109
109
}
110
110
111
- #[ cfg( not ( feature = "hosted-baosec" ) ) ]
111
+ #[ cfg( feature = "battery-readout" ) ]
112
112
{
113
113
use cramium_api:: I2cApi ;
114
114
let mut i2c = cram_hal_service:: I2c :: new ( ) ;
@@ -126,7 +126,7 @@ fn main() {
126
126
}
127
127
}
128
128
}
129
- #[ cfg( feature = "hosted-baosec" ) ]
129
+ #[ cfg( any ( feature = "hosted-baosec" , not ( feature = "battery-readout" ) ) ) ]
130
130
loop {
131
131
tt. sleep_ms ( 2_000 ) . ok ( ) ;
132
132
}
You can’t perform that action at this time.
0 commit comments