Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeechey committed Dec 2, 2024
1 parent 6a475c7 commit 42cf98f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/io/hyped_i2c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pub trait HypedI2c {
}

#[macro_export]
/// Macro to write a byte to a register on an I2C device or return an error.
/// Does nothing if the write is successful, otherwise returns the error type specified.
macro_rules! i2c_write_or_err {
($i2c:expr, $device_address:expr, $register_address:expr, $data:expr, $err_type:ty) => {
match $i2c.write_byte_to_register($device_address, $register_address, $data) {
Expand Down

0 comments on commit 42cf98f

Please sign in to comment.