| 201 | } |
| 202 | |
| 203 | bool 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 | |
| 229 | void UnPhoneFeatures::printInfo() const { |
| 230 | esp_io_expander_print_state(ioExpander); |
no test coverage detected