diff options
author | Ben V. Brown <[email protected]> | 2021-01-17 20:13:02 +1100 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2021-01-17 20:13:02 +1100 |
commit | 2425902fbc36f85ae429b5457004ee608f712add (patch) | |
tree | a4fb66369fc31fb69800591d17ba1180f9f561b1 /source/Core/BSP/Pine64/I2C_Wrapper.cpp | |
parent | cb34fb56e3d0cffac1950f11b12a3d357e7afcf5 (diff) | |
download | IronOS-2.14.1.tar.gz IronOS-2.14.1.zip |
Hotfix: BMA Accel wedges I2C if probed too fast after bootv2.14.1
Only an issue on Pinecil as it boots much faster than Miniware units.
Diffstat (limited to 'source/Core/BSP/Pine64/I2C_Wrapper.cpp')
-rw-r--r-- | source/Core/BSP/Pine64/I2C_Wrapper.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/Core/BSP/Pine64/I2C_Wrapper.cpp b/source/Core/BSP/Pine64/I2C_Wrapper.cpp index 180a71b6..c54380c0 100644 --- a/source/Core/BSP/Pine64/I2C_Wrapper.cpp +++ b/source/Core/BSP/Pine64/I2C_Wrapper.cpp @@ -385,18 +385,10 @@ bool FRToSI2C::lock() { if (I2CSemaphore == nullptr) {
return false;
}
- if (xTaskGetSchedulerState() != taskSCHEDULER_RUNNING) {
- return true;
- }
return xSemaphoreTake(I2CSemaphore, TICKS_SECOND) == pdTRUE;
}
-void FRToSI2C::unlock() {
- if (xTaskGetSchedulerState() != taskSCHEDULER_RUNNING) {
- return;
- }
- xSemaphoreGive(I2CSemaphore);
-}
+void FRToSI2C::unlock() { xSemaphoreGive(I2CSemaphore); }
bool FRToSI2C::writeRegistersBulk(const uint8_t address, const I2C_REG *registers, const uint8_t registersLength) {
for (int index = 0; index < registersLength; index++) {
|