HAL renaming & relocation (#215)
Implemented more consistent naming: - Moved all HAL devices into their own namespace (and related folder) - Post-fixed all HAL device names with "Device"
This commit is contained in:
committed by
GitHub
parent
a7a3b17ff6
commit
2345ba6d13
@@ -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