| 185 | // endregion Callbacks |
| 186 | |
| 187 | bool I2cScannerApp::getPort(struct Device** outPort) { |
| 188 | if (mutex.lock(100 / portTICK_PERIOD_MS)) { |
| 189 | *outPort = this->portDevice; |
| 190 | mutex.unlock(); |
| 191 | return true; |
| 192 | } else { |
| 193 | logger.warn(LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "getPort"); |
| 194 | return false; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | bool I2cScannerApp::addAddressToList(uint8_t address) { |
| 199 | if (mutex.lock(100 / portTICK_PERIOD_MS)) { |