From 240787557d22a78f2db30a6878008221a0bbebd5 Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 1 May 2024 13:23:44 +0200 Subject: [PATCH] Added error codes --- include/sta/bus/i2c/i2c.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/sta/bus/i2c/i2c.hpp b/include/sta/bus/i2c/i2c.hpp index e9896fc..63d1442 100644 --- a/include/sta/bus/i2c/i2c.hpp +++ b/include/sta/bus/i2c/i2c.hpp @@ -9,6 +9,21 @@ namespace sta { + /** + * @brief Possible errors that can occur during transmission- + * + */ + enum I2CError + { + SUCCESS, + ACK_FAILURE, + NACK, + DATA_TOO_LONG, + TIMEOUT, + BUS_ERROR, + ARBITRATION_LOSS, + }; + /** * @brief Interface class for %I2C hardware. *