| 33 | } |
| 34 | |
| 35 | static void startDisplays() { |
| 36 | LOGGER.info("Starting displays & touch"); |
| 37 | auto displays = hal::findDevices<display::DisplayDevice>(Device::Type::Display); |
| 38 | for (auto& display : displays) { |
| 39 | LOGGER.info("{} starting", display->getName()); |
| 40 | if (!display->start()) { |
| 41 | LOGGER.error("{} start failed", display->getName()); |
| 42 | } else { |
| 43 | LOGGER.info("{} started", display->getName()); |
| 44 | |
| 45 | if (display->supportsBacklightDuty()) { |
| 46 | LOGGER.info("Setting backlight"); |
| 47 | display->setBacklightDuty(0); |
| 48 | } |
| 49 | |
| 50 | auto touch = display->getTouchDevice(); |
| 51 | if (touch != nullptr) { |
| 52 | LOGGER.info("{} starting", touch->getName()); |
| 53 | if (!touch->start()) { |
| 54 | LOGGER.error("{} start failed", touch->getName()); |
| 55 | } else { |
| 56 | LOGGER.info("{} started", touch->getName()); |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void init(const Configuration& configuration) { |
| 64 | kernel::publishSystemEvent(kernel::SystemEvent::BootInitHalBegin); |
no test coverage detected