| 14 | static const auto LOGGER = Logger("Hal"); |
| 15 | |
| 16 | void registerDevices(const Configuration& configuration) { |
| 17 | LOGGER.info("Registering devices"); |
| 18 | |
| 19 | auto devices = configuration.createDevices(); |
| 20 | for (auto& device : devices) { |
| 21 | registerDevice(device); |
| 22 | |
| 23 | // Register attached devices |
| 24 | if (device->getType() == Device::Type::Display) { |
| 25 | const auto display = std::static_pointer_cast<display::DisplayDevice>(device); |
| 26 | assert(display != nullptr); |
| 27 | const std::shared_ptr<Device> touch = display->getTouchDevice(); |
| 28 | if (touch != nullptr) { |
| 29 | registerDevice(touch); |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | static void startDisplays() { |
| 36 | LOGGER.info("Starting displays & touch"); |
no test coverage detected