diff options
author | Timofey Titovets <nefelim4ag@gmail.com> | 2024-10-21 14:19:56 +0200 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2024-10-26 22:06:30 -0400 |
commit | a4aa2a900267c83d20247f93e6ddb06f63324135 (patch) | |
tree | 7c0d71f171ebc997e9205f8ed0489017a70878bc /src/i2ccmds.h | |
parent | 08a85ba869c3232ca7063c737c238ca41e20885e (diff) | |
download | kutter-a4aa2a900267c83d20247f93e6ddb06f63324135.tar.gz kutter-a4aa2a900267c83d20247f93e6ddb06f63324135.tar.xz kutter-a4aa2a900267c83d20247f93e6ddb06f63324135.zip |
i2c: handle errors at i2ccmds
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Diffstat (limited to 'src/i2ccmds.h')
-rw-r--r-- | src/i2ccmds.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i2ccmds.h b/src/i2ccmds.h index 477cee02..ed110bd3 100644 --- a/src/i2ccmds.h +++ b/src/i2ccmds.h @@ -4,6 +4,15 @@ #include <inttypes.h> #include "board/gpio.h" // i2c_config +// I2C ERROR Codes +enum { + I2C_BUS_SUCCESS, + I2C_BUS_NACK, + I2C_BUS_TIMEOUT, + I2C_BUS_START_NACK, + I2C_BUS_START_READ_NACK, +}; + struct i2cdev_s { union { struct i2c_config i2c_hw; |