Lockable renamed to Lock (#219)
Also changed usage from unique_ptr to class value.
This commit is contained in:
committed by
GitHub
parent
2e86d4774b
commit
55bfb9fe3b
@@ -73,7 +73,7 @@ const tt::hal::Configuration cyd_2432S024c_config = {
|
||||
.initMode = tt::hal::spi::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.lock = tt::lvgl::getLvglSyncLockable() // esp_lvgl_port owns the lock for the display
|
||||
.lock = tt::lvgl::getLvglSyncLock() // esp_lvgl_port owns the lock for the display
|
||||
},
|
||||
tt::hal::spi::Configuration {
|
||||
.device = SPI3_HOST,
|
||||
|
||||
@@ -78,7 +78,7 @@ extern const tt::hal::Configuration lilygo_tdeck = {
|
||||
.initMode = tt::hal::spi::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.lock = tt::lvgl::getLvglSyncLockable() // esp_lvgl_port owns the lock for the display
|
||||
.lock = tt::lvgl::getLvglSyncLock() // esp_lvgl_port owns the lock for the display
|
||||
}
|
||||
},
|
||||
.uart {
|
||||
|
||||
@@ -18,7 +18,7 @@ std::shared_ptr<SdCardDevice> createTdeckSdCard() {
|
||||
GPIO_NUM_NC,
|
||||
GPIO_NUM_NC,
|
||||
SdCardDevice::MountBehaviour::AtBoot,
|
||||
tt::lvgl::getLvglSyncLockable(),
|
||||
tt::lvgl::getLvglSyncLock(),
|
||||
{
|
||||
TDECK_RADIO_PIN_CS,
|
||||
TDECK_LCD_PIN_CS
|
||||
|
||||
@@ -75,7 +75,7 @@ extern const tt::hal::Configuration m5stack_core2 = {
|
||||
.initMode = tt::hal::spi::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.lock = tt::lvgl::getLvglSyncLockable() // esp_lvgl_port owns the lock for the display
|
||||
.lock = tt::lvgl::getLvglSyncLock() // esp_lvgl_port owns the lock for the display
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ std::shared_ptr<SdCardDevice> createSdCard() {
|
||||
GPIO_NUM_NC,
|
||||
GPIO_NUM_NC,
|
||||
SdCardDevice::MountBehaviour::AtBoot,
|
||||
tt::lvgl::getLvglSyncLockable(),
|
||||
tt::lvgl::getLvglSyncLock(),
|
||||
{
|
||||
CORE2_LCD_PIN_CS
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ const tt::hal::Configuration m5stack_cores3 = {
|
||||
.initMode = tt::hal::spi::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.lock = tt::lvgl::getLvglSyncLockable() // esp_lvgl_port owns the lock for the display
|
||||
.lock = tt::lvgl::getLvglSyncLock() // esp_lvgl_port owns the lock for the display
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ std::shared_ptr<SdCardDevice> createSdCard() {
|
||||
GPIO_NUM_NC,
|
||||
GPIO_NUM_NC,
|
||||
SdCardDevice::MountBehaviour::AtBoot,
|
||||
tt::lvgl::getLvglSyncLockable(),
|
||||
tt::lvgl::getLvglSyncLock(),
|
||||
{
|
||||
CORES3_LCD_PIN_CS
|
||||
},
|
||||
|
||||
@@ -11,14 +11,14 @@ class SimulatorSdCard final : public SdCardDevice {
|
||||
private:
|
||||
|
||||
State state;
|
||||
std::shared_ptr<tt::Lockable> lockable;
|
||||
std::shared_ptr<tt::Lock> lock;
|
||||
std::string mountPath;
|
||||
|
||||
public:
|
||||
|
||||
SimulatorSdCard() : SdCardDevice(MountBehaviour::AtBoot),
|
||||
state(State::Unmounted),
|
||||
lockable(std::make_shared<tt::Mutex>())
|
||||
lock(std::make_shared<tt::Mutex>())
|
||||
{}
|
||||
|
||||
std::string getName() const final { return "Mock SD Card"; }
|
||||
@@ -38,8 +38,7 @@ public:
|
||||
|
||||
std::string getMountPath() const final { return mountPath; };
|
||||
|
||||
std::shared_ptr<tt::Lockable> getLockable() const final { return lockable; }
|
||||
tt::Lock& getLock() const final { return *lock; }
|
||||
|
||||
State getState() const override { return state; }
|
||||
};
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ extern const tt::hal::Configuration unPhone = {
|
||||
.initMode = tt::hal::spi::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.lock = tt::lvgl::getLvglSyncLockable() // esp_lvgl_port owns the lock for the display
|
||||
.lock = tt::lvgl::getLvglSyncLock() // esp_lvgl_port owns the lock for the display
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ std::shared_ptr<SdCardDevice> createUnPhoneSdCard() {
|
||||
GPIO_NUM_NC,
|
||||
GPIO_NUM_NC,
|
||||
SdCardDevice::MountBehaviour::AtBoot,
|
||||
tt::lvgl::getLvglSyncLockable(),
|
||||
tt::lvgl::getLvglSyncLock(),
|
||||
{
|
||||
UNPHONE_LORA_PIN_CS,
|
||||
UNPHONE_LCD_PIN_CS,
|
||||
|
||||
Reference in New Issue
Block a user