diff --git a/Devices/Control/Firmware/lib/I2CCommunicator/I2CCommunicator.cpp b/Devices/Control/Firmware/lib/I2CCommunicator/I2CCommunicator.cpp new file mode 100644 index 0000000..b5b0d65 --- /dev/null +++ b/Devices/Control/Firmware/lib/I2CCommunicator/I2CCommunicator.cpp @@ -0,0 +1,7 @@ +#include +#include + +I2CCommunicator::I2CCommunicator(TwoWire &w_out, int slaveAddr, int timeout, __SIZE_TYPE__ bufferSize) : StreamCommunicator(w_out, bufferSize) +{ + w_out.begin(slaveAddr); +} \ No newline at end of file diff --git a/Devices/Control/Firmware/lib/I2CCommunicator/I2CCommunicator.h b/Devices/Control/Firmware/lib/I2CCommunicator/I2CCommunicator.h new file mode 100644 index 0000000..7523faa --- /dev/null +++ b/Devices/Control/Firmware/lib/I2CCommunicator/I2CCommunicator.h @@ -0,0 +1,8 @@ +#include +#include + +class I2CCommunicator : public StreamCommunicator +{ +public: + I2CCommunicator(TwoWire &w_out, int slaveAddr, int timeout, __SIZE_TYPE__ bufferSize); +};