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
@@ -1,7 +1,7 @@
|
||||
#include "UnPhoneSdCard.h"
|
||||
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/hal/SpiSdCard.h>
|
||||
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
||||
|
||||
#include <esp_vfs_fat.h>
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
#define UNPHONE_LORA_PIN_CS GPIO_NUM_44
|
||||
#define UNPHONE_TOUCH_PIN_CS GPIO_NUM_38
|
||||
|
||||
std::shared_ptr<SdCard> createUnPhoneSdCard() {
|
||||
auto* configuration = new tt::hal::SpiSdCard::Config(
|
||||
using tt::hal::sdcard::SpiSdCardDevice;
|
||||
|
||||
std::shared_ptr<SdCardDevice> createUnPhoneSdCard() {
|
||||
auto* configuration = new SpiSdCardDevice::Config(
|
||||
UNPHONE_SDCARD_PIN_CS,
|
||||
GPIO_NUM_NC,
|
||||
GPIO_NUM_NC,
|
||||
GPIO_NUM_NC,
|
||||
SdCard::MountBehaviour::AtBoot,
|
||||
SdCardDevice::MountBehaviour::AtBoot,
|
||||
tt::lvgl::getLvglSyncLockable(),
|
||||
{
|
||||
UNPHONE_LORA_PIN_CS,
|
||||
@@ -25,9 +27,9 @@ std::shared_ptr<SdCard> createUnPhoneSdCard() {
|
||||
}
|
||||
);
|
||||
|
||||
auto* sdcard = (SdCard*) new SpiSdCard(
|
||||
std::unique_ptr<SpiSdCard::Config>(configuration)
|
||||
auto* sdcard = (SdCardDevice*) new SpiSdCardDevice(
|
||||
std::unique_ptr<SpiSdCardDevice::Config>(configuration)
|
||||
);
|
||||
|
||||
return std::shared_ptr<SdCard>(sdcard);
|
||||
return std::shared_ptr<SdCardDevice>(sdcard);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user