Fork of Tangara with customizations
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#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
|