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

Method init

Devices/unphone/Source/UnPhoneFeatures.cpp:203–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203bool UnPhoneFeatures::init() {
204 LOGGER.info("init");
205
206 if (!initGpioExpander()) {
207 LOGGER.error("GPIO expander init failed");
208 return false;
209 }
210
211 if (!initNavButtons()) {
212 LOGGER.error("Input pin init failed");
213 return false;
214 }
215
216 if (!initOutputPins()) {
217 LOGGER.error("Output pin init failed");
218 return false;
219 }
220
221 if (!initPowerSwitch()) {
222 LOGGER.error("Power button init failed");
223 return false;
224 }
225
226 return true;
227}
228
229void UnPhoneFeatures::printInfo() const {
230 esp_io_expander_print_state(ioExpander);

Callers 2

unPhonePowerOnFunction · 0.45
startLvglMethod · 0.45

Calls 3

infoMethod · 0.80
errorMethod · 0.80
initGpioExpanderFunction · 0.50

Tested by

no test coverage detected