// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once #include "drivers/pll/DriverPLL.hpp" #include "drivers/dmamux/DriverDMAMux.hpp" #include "drivers/dma/DriverDMA.hpp" #include "fsl_sai_edma.h" #include #include namespace bsp::audio { void init(std::uint32_t sampleRate); void deinit(); struct AudioConfig { sai_config_t config; std::uint32_t mclkSourceClockHz; std::shared_ptr pllAudio; std::shared_ptr dmamux; std::shared_ptr dma; std::unique_ptr rxDMAHandle; std::unique_ptr txDMAHandle; static AudioConfig *get(); }; }; // namespace bsp::audio