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,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Tactility/hal/sdcard/SdCardDevice.h>
|
||||
#include <Tactility/hal/spi/Spi.h>
|
||||
|
||||
namespace tt::hal {
|
||||
|
||||
@@ -11,11 +10,6 @@ typedef std::vector<std::shared_ptr<Device>> DeviceVector;
|
||||
|
||||
typedef std::shared_ptr<Device> (*CreateDevice)();
|
||||
|
||||
enum class LvglInit {
|
||||
Default,
|
||||
None
|
||||
};
|
||||
|
||||
/** Affects LVGL widget style */
|
||||
enum class UiScale {
|
||||
/** Ideal for very small non-touch screen devices (e.g. Waveshare S3 LCD 1.3") */
|
||||
@@ -26,21 +20,14 @@ enum class UiScale {
|
||||
|
||||
struct Configuration {
|
||||
/**
|
||||
* Called before I2C/SPI/etc is initialized.
|
||||
* Used for powering on the peripherals manually.
|
||||
*/
|
||||
const InitBoot initBoot = nullptr;
|
||||
|
||||
/** Init behaviour: default (esp_lvgl_port for ESP32, nothing for PC) or None (nothing on any platform). Only used in Tactility, not in TactilityHeadless. */
|
||||
const LvglInit lvglInit = LvglInit::Default;
|
||||
|
||||
/** Modify LVGL widget size */
|
||||
const UiScale uiScale = UiScale::Default;
|
||||
|
||||
std::function<DeviceVector()> createDevices = [] { return std::vector<std::shared_ptr<Device>>(); };
|
||||
|
||||
/** A list of SPI interface configurations */
|
||||
const std::vector<spi::Configuration> spi = {};
|
||||
const std::function<DeviceVector()> createDevices = [] { return DeviceVector(); };
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user