#ifndef STA_CORE_I2C_DEVICE_HPP #define STA_CORE_I2C_DEVICE_HPP #include #include namespace sta { /** * @brief Peripheral device connected via I2c. * * @ingroup sta_core_i2c */ class I2CDevice : public Device { public: /** * @param intf %I2C hardware interface * @param csPin The peripheral's address. */ I2CDevice(I2C * intf, int address, bool master=true, bool blocking=true); protected: void select() override; void deselect() override; private: I2C * intf_; int address_; /**< device address */ int master_; int blocking_; }; } // namespace sta #endif // STA_CORE_I2C_DEVICE_HPP