summaryrefslogtreecommitdiff
path: root/src/drivers/test/test_dac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/test/test_dac.cpp')
-rw-r--r--src/drivers/test/test_dac.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/drivers/test/test_dac.cpp b/src/drivers/test/test_dac.cpp
new file mode 100644
index 00000000..aa7a521c
--- /dev/null
+++ b/src/drivers/test/test_dac.cpp
@@ -0,0 +1,21 @@
+#include <cstdint>
+#include "dac.hpp"
+#include "gpio-expander.hpp"
+#include "i2c.hpp"
+#include "i2c_fixture.hpp"
+
+#include "catch2/catch.hpp"
+
+namespace drivers {
+
+TEST_CASE("dac configuration", "[integration]") {
+ I2CFixture i2c;
+ GpioExpander expander;
+ std::unique_ptr<AudioDac> dac = AudioDac::create(&expander).value();
+
+ auto power_state = dac->ReadPowerState();
+
+ REQUIRE(power_state.first == true); // booted
+}
+
+} // namespace drivers