Merge TactilityHeadless into Tactility (#263)
There currently is no practical use to have TactilityHeadless as a subproject. I'm merging it with the Tactility project.
This commit is contained in:
committed by
GitHub
parent
d0ca3b16f8
commit
d72852a6e2
@@ -0,0 +1,17 @@
|
||||
#include "Tactility/hal/Device.h"
|
||||
#include "Tactility/hal/sdcard/SdCardDevice.h"
|
||||
|
||||
namespace tt::hal::sdcard {
|
||||
|
||||
std::shared_ptr<SdCardDevice> _Nullable find(const std::string& path) {
|
||||
auto sdcards = findDevices<SdCardDevice>(Device::Type::SdCard);
|
||||
for (auto& sdcard : sdcards) {
|
||||
if (sdcard->isMounted() && path.starts_with(sdcard->getMountPath())) {
|
||||
return sdcard;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user