From 178cb8cd699475a73591b63c90f4c2e9bd3cc4d2 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Wed, 15 Nov 2023 16:40:40 +0100 Subject: [PATCH] Update prints to output hex format --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8dc6267..677775c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -103,7 +103,7 @@ pub unsafe fn on_i2c_read(user_ctx: *const c_void) -> u8 { } pub unsafe fn on_i2c_write(user_ctx: *const c_void, data: u8) -> bool { - let msg = format!("on_i2c_write: {}", data); + let msg = format!("on_i2c_write: {:#02x}", data); debugPrint(CString::new(msg).unwrap().into_raw()); let chip: &mut Chip = &mut CHIP_VEC[user_ctx as usize];