diff options
Diffstat (limited to 'src/drivers/include/dac.hpp')
| -rw-r--r-- | src/drivers/include/dac.hpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/drivers/include/dac.hpp b/src/drivers/include/dac.hpp index 698019b7..e682d8d7 100644 --- a/src/drivers/include/dac.hpp +++ b/src/drivers/include/dac.hpp @@ -10,6 +10,7 @@ #include "driver/i2s_std.h" #include "driver/i2s_types.h" #include "esp_err.h" +#include "freertos/FreeRTOS.h" #include "freertos/portmacro.h" #include "result.hpp" #include "span.hpp" @@ -67,10 +68,9 @@ class AudioDac { }; // TODO(jacqueline): worth supporting channels here as well? - auto Reconfigure(BitsPerSample bps, SampleRate rate, QueueHandle_t dma_queue) - -> std::size_t; + auto Reconfigure(BitsPerSample bps, SampleRate rate) -> void; - auto WriteDataFromISR(std::byte* data, std::size_t size) -> bool; + auto WriteData(cpp::span<std::byte> data) -> std::size_t; // Not copyable or movable. AudioDac(const AudioDac&) = delete; @@ -83,9 +83,6 @@ class AudioDac { i2s_std_clk_config_t clock_config_; i2s_std_slot_config_t slot_config_; - // TODO: volatile? - volatile QueueHandle_t dma_queue_; - /* * Pools the power state for up to 10ms, waiting for the given predicate to * be true. |
