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

Method setExpanderPower

Devices/unphone/Source/UnPhoneFeatures.cpp:270–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270bool UnPhoneFeatures::setExpanderPower(bool on) const {
271 assert(ioExpander != nullptr);
272 return esp_io_expander_set_level(ioExpander, expanderpin::EXPANDER_POWER, on ? 1U : 0U) == ESP_OK;
273}
274
275bool UnPhoneFeatures::isPowerSwitchOn() const {
276 return gpio_get_level(pin::POWER_SWITCH) > 0;

Callers 2

updatePowerSwitchFunction · 0.80
unPhonePowerOnFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected