diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-30 16:48:10 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-30 16:48:10 +1000 |
| commit | 320fdeb9d8355d3c361d5c6d60de8afc64501af9 (patch) | |
| tree | f0d5a2ab82199c78ad6768c6b18ba1239a0b7ee4 /src/drivers/include/display.hpp | |
| parent | 4247c9fe7d25c921fbfc73fc50e849c8780e7ad6 (diff) | |
| download | tangara-fw-320fdeb9d8355d3c361d5c6d60de8afc64501af9.tar.gz | |
Use a service locator instead of passing around subsets of drivers between FSMs
Diffstat (limited to 'src/drivers/include/display.hpp')
| -rw-r--r-- | src/drivers/include/display.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<tasks::Worker> worker_task_; |
