Merge develop into main (#316)
- Updated all boards to use `hal::Configuration.createDevices` - Updated all boards to use new directory structure and file naming convention - Refactored `Xpt2046SoftSpi` driver. - Created `Axp2101Power` device in `Drivers/AXP2101` - Removed global static instances from some drivers (instances that kept a reference to the Device*) - Improved `SystemInfoApp` UI: better memory labels, hide external memory bar when there's no PSRAM - Fix for HAL: register touch devices after displays are registered - Fix for Boot splash hanging on WiFi init: unlock file lock after using it
This commit is contained in:
committed by
GitHub
parent
1deaf4c426
commit
1627b9fa85
@@ -1,22 +1,21 @@
|
||||
#include "Tactility/lvgl/LvglSync.h"
|
||||
#include "hal/TpagerDisplay.h"
|
||||
#include "hal/TpagerEncoder.h"
|
||||
#include "hal/TpagerDisplayConstants.h"
|
||||
#include "hal/TpagerKeyboard.h"
|
||||
#include "hal/TpagerPower.h"
|
||||
#include "hal/TpagerSdCard.h"
|
||||
#include "devices/Display.h"
|
||||
#include "devices/SdCard.h"
|
||||
#include "devices/TpagerEncoder.h"
|
||||
#include "devices/TpagerKeyboard.h"
|
||||
#include "devices/TpagerPower.h"
|
||||
|
||||
#include <Bq25896.h>
|
||||
#include <Drv2605.h>
|
||||
#include <Tactility/hal/Configuration.h>
|
||||
|
||||
#define TPAGER_SPI_TRANSFER_SIZE_LIMIT (TPAGER_LCD_HORIZONTAL_RESOLUTION * TPAGER_LCD_SPI_TRANSFER_HEIGHT * (LV_COLOR_DEPTH / 8))
|
||||
#define TPAGER_SPI_TRANSFER_SIZE_LIMIT (480 * 222 * (LV_COLOR_DEPTH / 8))
|
||||
|
||||
bool tpagerInit();
|
||||
|
||||
using namespace tt::hal;
|
||||
|
||||
DeviceVector createDevices() {
|
||||
static DeviceVector createDevices() {
|
||||
auto bq27220 = std::make_shared<Bq27220>(I2C_NUM_0);
|
||||
auto power = std::make_shared<TpagerPower>(bq27220);
|
||||
|
||||
|
||||
+7
-3
@@ -1,10 +1,14 @@
|
||||
#include "TpagerDisplay.h"
|
||||
#include "TpagerDisplayConstants.h"
|
||||
#include "Display.h"
|
||||
|
||||
#include <PwmBacklight.h>
|
||||
#include <St7796Display.h>
|
||||
|
||||
#include <driver/spi_master.h>
|
||||
#define TPAGER_LCD_SPI_HOST SPI2_HOST
|
||||
#define TPAGER_LCD_PIN_CS GPIO_NUM_38
|
||||
#define TPAGER_LCD_PIN_DC GPIO_NUM_37 // RS
|
||||
#define TPAGER_LCD_HORIZONTAL_RESOLUTION 222
|
||||
#define TPAGER_LCD_VERTICAL_RESOLUTION 480
|
||||
#define TPAGER_LCD_SPI_TRANSFER_HEIGHT (TPAGER_LCD_VERTICAL_RESOLUTION / 10)
|
||||
|
||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
||||
auto configuration = std::make_unique<St7796Display::Configuration>(
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "TpagerSdCard.h"
|
||||
#include "SdCard.h"
|
||||
|
||||
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
+1
-1
@@ -111,7 +111,7 @@ void TpagerEncoder::initEncoder() {
|
||||
}
|
||||
}
|
||||
|
||||
int TpagerEncoder::getEncoderPulses() {
|
||||
int TpagerEncoder::getEncoderPulses() const {
|
||||
int pulses = 0;
|
||||
pcnt_unit_get_count(encPcntUnit, &pulses);
|
||||
return pulses;
|
||||
+2
-2
@@ -15,7 +15,7 @@ class TpagerEncoder final : public tt::hal::encoder::EncoderDevice {
|
||||
public:
|
||||
|
||||
TpagerEncoder() {}
|
||||
~TpagerEncoder() {}
|
||||
~TpagerEncoder() override {}
|
||||
|
||||
std::string getName() const override { return "T-Lora Pager Encoder"; }
|
||||
std::string getDescription() const override { return "The encoder wheel next to the display"; }
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
bool startLvgl(lv_display_t* display) override;
|
||||
bool stopLvgl() override;
|
||||
|
||||
int getEncoderPulses();
|
||||
int getEncoderPulses() const;
|
||||
|
||||
lv_indev_t* _Nullable getLvglIndev() override { return encHandle; }
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define TPAGER_LCD_SPI_HOST SPI2_HOST
|
||||
#define TPAGER_LCD_PIN_CS GPIO_NUM_38
|
||||
#define TPAGER_LCD_PIN_DC GPIO_NUM_37 // RS
|
||||
#define TPAGER_LCD_HORIZONTAL_RESOLUTION 222
|
||||
#define TPAGER_LCD_VERTICAL_RESOLUTION 480
|
||||
#define TPAGER_LCD_SPI_TRANSFER_HEIGHT (TPAGER_LCD_VERTICAL_RESOLUTION / 10)
|
||||
Reference in New Issue
Block a user