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

Function createPower

Devices/m5stack-tab5/Source/devices/Power.cpp:182–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180};
181
182std::shared_ptr<PowerDevice> createPower() {
183 auto* ina226 = device_find_by_name("ina226");
184 if (ina226 == nullptr) {
185 LOG_E(TAG, "ina226 device not found");
186 }
187 auto* io_expander1 = device_find_by_name("io_expander1");
188 if (io_expander1 == nullptr) {
189 LOG_E(TAG, "io_expander1 not found");
190 }
191 return std::make_shared<Tab5Power>(ina226, io_expander1);
192}

Callers 1

createDevicesFunction · 0.50

Calls 1

device_find_by_nameFunction · 0.85

Tested by

no test coverage detected