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.
32 lines
551 B
32 lines
551 B
/*
|
|
* Copyright 2023 jacqueline <me@jacqueline.id.au>
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
*/
|
|
|
|
#include "drivers/samd.hpp"
|
|
|
|
#include <cstdint>
|
|
|
|
#include "catch2/catch.hpp"
|
|
|
|
#include "i2c_fixture.hpp"
|
|
|
|
namespace drivers {
|
|
|
|
TEST_CASE("samd21 interface", "[integration]") {
|
|
I2CFixture i2c;
|
|
auto samd = std::make_unique<Samd>();
|
|
|
|
REQUIRE(samd);
|
|
|
|
SECTION("usb reports connection") {
|
|
samd->UpdateUsbStatus();
|
|
|
|
auto status = samd->GetUsbStatus();
|
|
|
|
REQUIRE(status == Samd::UsbStatus::kAttachedIdle);
|
|
}
|
|
}
|
|
|
|
} // namespace drivers
|
|
|