Skip to content

Commit

Permalink
Update prints to output hex format
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Nov 15, 2023
1 parent 1e57ddb commit 178cb8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 178cb8c

Please sign in to comment.