diff --git a/include/sta/i2c.hpp b/include/sta/i2c.hpp index db467dd..aa023fd 100644 --- a/include/sta/i2c.hpp +++ b/include/sta/i2c.hpp @@ -1,17 +1,18 @@ -#ifndef STA_I2C_HPP -#define STA_I2C_HPP +#ifndef STA_CORE_I2C_HPP +#define STA_CORE_I2C_HPP #include #include -namespace sta { - class I2cDevice { - protected: - uint16_t address; - Mutex* mutex; - bool master; - bool blocking; +namespace sta +{ + /** + * @brief Interface class for %SPI Hardware. + */ + class I2cDevice + { public: + I2cDevice(uint16_t address_10bit, Mutex* mutex=nullptr, bool master=false, bool blocking=true); virtual bool transmit(uint8_t* data, uint16_t size) = 0; @@ -21,7 +22,13 @@ namespace sta { virtual void acquire(); virtual void release(); - }; -} -#endif // STA_I2C_HPP + protected: + uint16_t address; + Mutex* mutex; + bool master; + bool blocking; + }; +} // namespace sta + +#endif // STA_CORE_I2C_HPP