From 320fdeb9d8355d3c361d5c6d60de8afc64501af9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 30 Aug 2023 16:48:10 +1000 Subject: Use a service locator instead of passing around subsets of drivers between FSMs --- src/drivers/include/display.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers/include/display.hpp') diff --git a/src/drivers/include/display.hpp b/src/drivers/include/display.hpp index 77165c99..766fc4ea 100644 --- a/src/drivers/include/display.hpp +++ b/src/drivers/include/display.hpp @@ -30,10 +30,10 @@ class Display { * over SPI. This never fails, since unfortunately these display don't give * us back any kind of signal to tell us we're actually using them correctly. */ - static auto Create(IGpios* expander, + static auto Create(IGpios& expander, const displays::InitialisationData& init_data) -> Display*; - Display(IGpios* gpio, spi_device_handle_t handle); + Display(IGpios& gpio, spi_device_handle_t handle); ~Display(); auto SetDisplayOn(bool) -> void; @@ -49,7 +49,7 @@ class Display { Display& operator=(const Display&) = delete; private: - IGpios* gpio_; + IGpios& gpio_; spi_device_handle_t handle_; std::unique_ptr worker_task_; -- cgit v1.2.3