I2C Error fixes

This commit is contained in:
Theodor Teslia
2023-03-17 14:15:22 +01:00
parent 08e61cb300
commit 94f9cdd884
2 changed files with 8 additions and 6 deletions

View File

@@ -1,10 +1,11 @@
#include <sta/i2c.hpp>
namespace sta {
I2cDevice::I2cDevice(uint16_t address_7bit, Mutex* mutex, bool master) {
I2cDevice::I2cDevice(uint16_t address_7bit, Mutex* mutex, bool master, bool blocking) {
this->address = address_7bit << 1;
this->mutex = mutex;
this->master = master;
this->blocking = blocking;
}
void I2cDevice::acquire() {
@@ -18,4 +19,4 @@ namespace sta {
mutex->release();
}
}
}
}