File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,7 @@ add_custom_target(rust-bindgen
395395 --allowlist-function secp256k1_ecdsa_anti_exfil_host_commit
396396 --allowlist-function wally_get_secp_context
397397 --allowlist-function wally_hash160
398+ --allowlist-function printf
398399 ${CMAKE_CURRENT_SOURCE_DIR} /rust/bitbox02-sys/wrapper.h --
399400 -DPB_NO_PACKED_STRUCTS=1 -DPB_FIELD_16BIT=1 -fshort-enums ${RUST_BINDGEN_FLAGS} ${RUST_INCLUDES}
400401 COMMAND
Original file line number Diff line number Diff line change @@ -176,6 +176,13 @@ pub fn reboot() -> ! {
176176 panic ! ( "reboot called" )
177177}
178178
179+ #[ cfg( feature = "testing" ) ]
180+ pub fn print_stdout ( msg : & str ) {
181+ unsafe {
182+ bitbox02_sys:: printf ( crate :: util:: str_to_cstr_vec ( msg) . unwrap ( ) . as_ptr ( ) ) ;
183+ }
184+ }
185+
179186#[ cfg( test) ]
180187mod tests {
181188 use super :: * ;
You can’t perform that action at this time.
0 commit comments