Fixed broken imports after dir structure rework & added stm32 i2c

This commit is contained in:
dvdb97
2023-06-24 15:44:56 +02:00
parent 6b4acfd27b
commit e7ddbbf365
26 changed files with 224 additions and 150 deletions

View File

@@ -11,22 +11,25 @@ namespace sta
*
* @ingroup sta_core_i2c
*/
class I2cDevice : public Device
class I2CDevice : public Device
{
public:
/**
* @param intf %I2C hardware interface
* @param csPin The peripheral's address.
*/
I2cDevice(I2c * intf, int addr);
I2CDevice(I2C * intf, int address, bool master=false, bool blocking=true);
protected:
void select() override;
void deselect() override;
private:
int addr_; /**< device address */
I2C * intf_;
int address_; /**< device address */
int master_;
int blocking_;
};
} // namespace sta
@@ -34,4 +37,4 @@ namespace sta
#endif // STA_CORE_I2C_DEVICE_HPP
#endif // STA_CORE_I2C_DEVICE_HPP