MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getPort

Method getPort

Tactility/Source/app/i2cscanner/I2cScanner.cpp:187–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185// endregion Callbacks
186
187bool 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
198bool I2cScannerApp::addAddressToList(uint8_t address) {
199 if (mutex.lock(100 / portTICK_PERIOD_MS)) {

Callers

nothing calls this directly

Calls 3

warnMethod · 0.80
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected