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

Method addAddressToList

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

Source from the content-addressed store, hash-verified

196}
197
198bool I2cScannerApp::addAddressToList(uint8_t address) {
199 if (mutex.lock(100 / portTICK_PERIOD_MS)) {
200 scannedAddresses.push_back(address);
201 mutex.unlock();
202 return true;
203 } else {
204 logger.warn(LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "addAddressToList");
205 return false;
206 }
207}
208
209bool I2cScannerApp::shouldStopScanTimer() {
210 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