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/i2s_dac.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers/include/i2s_dac.hpp') diff --git a/src/drivers/include/i2s_dac.hpp b/src/drivers/include/i2s_dac.hpp index c7faed2f..6bc5b6a4 100644 --- a/src/drivers/include/i2s_dac.hpp +++ b/src/drivers/include/i2s_dac.hpp @@ -33,9 +33,9 @@ namespace drivers { */ class I2SDac { public: - static auto create(IGpios* expander) -> std::optional; + static auto create(IGpios& expander) -> std::optional; - I2SDac(IGpios* gpio, i2s_chan_handle_t i2s_handle); + I2SDac(IGpios& gpio, i2s_chan_handle_t i2s_handle); ~I2SDac(); auto Start() -> void; @@ -69,7 +69,7 @@ class I2SDac { I2SDac& operator=(const I2SDac&) = delete; private: - IGpios* gpio_; + IGpios& gpio_; i2s_chan_handle_t i2s_handle_; bool i2s_active_; StreamBufferHandle_t buffer_; -- cgit v1.2.3