33 lines
698 B
C++

#ifndef STA_CORE_I2C_I2C_HPP
#define STA_CORE_I2C_I2C_HPP
#include <sta/bus/interface.hpp>
#include <sta/mutex.hpp>
#include <cstddef>
#include <cstdint>
namespace sta
{
/**
* @brief Interface class for %I2C hardware.
*
* Represents a single %I2C bus that can be shared by multiple devices.
*
* @ingroup sta_core_i2c
*/
class I2c : public Interface
{
public:
I2c(Mutex * mutex=nullptr);
/**
* @brief Address selection for the I2C bus.
*
* @param address The address to select.
*/
virtual void selectAddress(uint16_t address) = 0;
};
} // namespace sta
#endif // STA_CORE_I2C_I2C_HPP