Added I2C support for raspi & first rework of debugging

This commit is contained in:
Dario
2023-06-23 15:50:54 +01:00
parent 3cf2173433
commit 6b4acfd27b
70 changed files with 985 additions and 772 deletions

View File

@@ -0,0 +1,37 @@
#ifndef STA_CORE_I2C_DEVICE_HPP
#define STA_CORE_I2C_DEVICE_HPP
#include <sta/bus/i2c/i2c.hpp>
#include <sta/bus/device.hpp>
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 addr);
protected:
void select() override;
void deselect() override;
private:
int addr_; /**< device address */
};
} // namespace sta
#endif // STA_CORE_I2C_DEVICE_HPP