SPI device migration (#490)
- Implement SPI devices in dts files for all devices - Removed `tt::hal::spi` HAL and its configurations - Fix for devicetree generator "boolean" support - Remove unused custom locks in all `DisplayDevice` implementations - Fixed some bugs with devices - Updated XPT2046 driver - Fix for `WifiEsp` deadlock - Export a lot of new `math.h` symbols with `tt_init.cpp` - Created `SpiDeviceLock` in `TactilityCore` as a wrapper for kernel SPI locking - Improved `TactilityKernel` SPI driver.
This commit is contained in:
committed by
GitHub
parent
74127a5f6c
commit
d27404964a
@@ -1,15 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <Tactility/hal/display/DisplayDevice.h>
|
||||
#include <Tactility/RecursiveMutex.h>
|
||||
#include <EspLcdDisplayDriver.h>
|
||||
#include <esp_lcd_panel_rgb.h>
|
||||
#include <esp_lvgl_port_disp.h>
|
||||
|
||||
class RgbDisplay final : public tt::hal::display::DisplayDevice {
|
||||
|
||||
std::shared_ptr<tt::Lock> lock = std::make_shared<tt::RecursiveMutex>();
|
||||
|
||||
public:
|
||||
|
||||
struct BufferConfiguration final {
|
||||
@@ -75,7 +72,7 @@ public:
|
||||
assert(configuration != nullptr);
|
||||
}
|
||||
|
||||
~RgbDisplay();
|
||||
~RgbDisplay() override;
|
||||
|
||||
std::string getName() const override { return "RGB Display"; }
|
||||
std::string getDescription() const override { return "RGB Display"; }
|
||||
@@ -108,7 +105,7 @@ public:
|
||||
std::shared_ptr<tt::hal::display::DisplayDriver> _Nullable getDisplayDriver() override {
|
||||
if (displayDriver == nullptr) {
|
||||
auto config = getLvglPortDisplayConfig();
|
||||
displayDriver = std::make_shared<EspLcdDisplayDriver>(panelHandle, lock, config.hres, config.vres, tt::hal::display::ColorFormat::RGB888);
|
||||
displayDriver = std::make_shared<EspLcdDisplayDriver>(panelHandle, config.hres, config.vres, tt::hal::display::ColorFormat::RGB888);
|
||||
}
|
||||
return displayDriver;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user