From a4aa2a900267c83d20247f93e6ddb06f63324135 Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Mon, 21 Oct 2024 14:19:56 +0200 Subject: i2c: handle errors at i2ccmds Signed-off-by: Timofey Titovets --- src/i2ccmds.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/i2ccmds.h') 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 #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; -- cgit v1.2.3-70-g09d2