+Fixup: LilygoTLoraPager - Fixed mangled autoformat, renamed TDECK_* constants to TPAGER_*
This commit is contained in:
parent
da190e7803
commit
f7cfa9a431
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <Tactility/hal/Configuration.h>
|
#include <Tactility/hal/Configuration.h>
|
||||||
|
|
||||||
#define TDECK_SPI_TRANSFER_SIZE_LIMIT (TDECK_LCD_HORIZONTAL_RESOLUTION * TDECK_LCD_SPI_TRANSFER_HEIGHT * (LV_COLOR_DEPTH / 8))
|
#define TPAGER_SPI_TRANSFER_SIZE_LIMIT (TPAGER_LCD_HORIZONTAL_RESOLUTION * TPAGER_LCD_SPI_TRANSFER_HEIGHT * (LV_COLOR_DEPTH / 8))
|
||||||
|
|
||||||
bool tpagerInit();
|
bool tpagerInit();
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ extern const Configuration lilygo_tlora_pager = {
|
|||||||
.power = tpager_get_power,
|
.power = tpager_get_power,
|
||||||
.i2c = {
|
.i2c = {
|
||||||
i2c::Configuration {
|
i2c::Configuration {
|
||||||
.name = "Internal",
|
.name = "Shared",
|
||||||
.port = I2C_NUM_0,
|
.port = I2C_NUM_0,
|
||||||
.initMode = i2c::InitMode::ByTactility,
|
.initMode = i2c::InitMode::ByTactility,
|
||||||
.isMutable = true,
|
.isMutable = true,
|
||||||
@ -49,7 +49,7 @@ extern const Configuration lilygo_tlora_pager = {
|
|||||||
.data6_io_num = GPIO_NUM_NC,
|
.data6_io_num = GPIO_NUM_NC,
|
||||||
.data7_io_num = GPIO_NUM_NC,
|
.data7_io_num = GPIO_NUM_NC,
|
||||||
.data_io_default_level = false,
|
.data_io_default_level = false,
|
||||||
.max_transfer_sz = TDECK_SPI_TRANSFER_SIZE_LIMIT,
|
.max_transfer_sz = TPAGER_SPI_TRANSFER_SIZE_LIMIT,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO,
|
.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO,
|
||||||
.intr_flags = 0},
|
.intr_flags = 0},
|
||||||
@ -57,8 +57,27 @@ extern const Configuration lilygo_tlora_pager = {
|
|||||||
.isMutable = false,
|
.isMutable = false,
|
||||||
.lock = tt::lvgl::getSyncLock() // esp_lvgl_port owns the lock for the display
|
.lock = tt::lvgl::getSyncLock() // esp_lvgl_port owns the lock for the display
|
||||||
}},
|
}},
|
||||||
.uart {uart::Configuration {.name = "Grove", .port = UART_NUM_1, .rxPin = GPIO_NUM_4, .txPin = GPIO_NUM_12, .rtsPin = GPIO_NUM_NC, .ctsPin = GPIO_NUM_NC, .rxBufferSize = 1024, .txBufferSize = 1024, .config = {.baud_rate = 38400, .data_bits = UART_DATA_8_BITS, .parity = UART_PARITY_DISABLE, .stop_bits = UART_STOP_BITS_1, .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, .rx_flow_ctrl_thresh = 0, .source_clk = UART_SCLK_DEFAULT, .flags = {
|
.uart {uart::Configuration {
|
||||||
.allow_pd = 0,
|
.name = "Grove",
|
||||||
.backup_before_sleep = 0,
|
.port = UART_NUM_1,
|
||||||
}}}}
|
.rxPin = GPIO_NUM_4,
|
||||||
|
.txPin = GPIO_NUM_12,
|
||||||
|
.rtsPin = GPIO_NUM_NC,
|
||||||
|
.ctsPin = GPIO_NUM_NC,
|
||||||
|
.rxBufferSize = 1024,
|
||||||
|
.txBufferSize = 1024,
|
||||||
|
.config = {
|
||||||
|
.baud_rate = 38400,
|
||||||
|
.data_bits = UART_DATA_8_BITS,
|
||||||
|
.parity = UART_PARITY_DISABLE,
|
||||||
|
.stop_bits = UART_STOP_BITS_1,
|
||||||
|
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
||||||
|
.rx_flow_ctrl_thresh = 0,
|
||||||
|
.source_clk = UART_SCLK_DEFAULT,
|
||||||
|
.flags = {
|
||||||
|
.allow_pd = 0,
|
||||||
|
.backup_before_sleep = 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
#include <driver/spi_master.h>
|
#include <driver/spi_master.h>
|
||||||
|
|
||||||
#define TAG "tdeck_display"
|
#define TAG "TPAGER_display"
|
||||||
|
|
||||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
||||||
auto configuration = std::make_unique<St7796Display::Configuration>(
|
auto configuration = std::make_unique<St7796Display::Configuration>(
|
||||||
TDECK_LCD_SPI_HOST,
|
TPAGER_LCD_SPI_HOST,
|
||||||
TDECK_LCD_PIN_CS,
|
TPAGER_LCD_PIN_CS,
|
||||||
TDECK_LCD_PIN_DC,
|
TPAGER_LCD_PIN_DC,
|
||||||
480, // w
|
480, // w
|
||||||
222, // h
|
222, // h
|
||||||
nullptr,
|
nullptr,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define TDECK_LCD_SPI_HOST SPI2_HOST
|
#define TPAGER_LCD_SPI_HOST SPI2_HOST
|
||||||
#define TDECK_LCD_PIN_CS GPIO_NUM_38
|
#define TPAGER_LCD_PIN_CS GPIO_NUM_38
|
||||||
#define TDECK_LCD_PIN_DC GPIO_NUM_37 // RS
|
#define TPAGER_LCD_PIN_DC GPIO_NUM_37 // RS
|
||||||
#define TDECK_LCD_HORIZONTAL_RESOLUTION 222
|
#define TPAGER_LCD_HORIZONTAL_RESOLUTION 222
|
||||||
#define TDECK_LCD_VERTICAL_RESOLUTION 480
|
#define TPAGER_LCD_VERTICAL_RESOLUTION 480
|
||||||
#define TDECK_LCD_SPI_TRANSFER_HEIGHT (TDECK_LCD_VERTICAL_RESOLUTION / 10)
|
#define TPAGER_LCD_SPI_TRANSFER_HEIGHT (TPAGER_LCD_VERTICAL_RESOLUTION / 10)
|
||||||
|
|||||||
@ -7,20 +7,20 @@
|
|||||||
|
|
||||||
using tt::hal::sdcard::SpiSdCardDevice;
|
using tt::hal::sdcard::SpiSdCardDevice;
|
||||||
|
|
||||||
#define TDECK_SDCARD_PIN_CS GPIO_NUM_21
|
#define TPAGER_SDCARD_PIN_CS GPIO_NUM_21
|
||||||
#define TDECK_LCD_PIN_CS GPIO_NUM_38
|
#define TPAGER_LCD_PIN_CS GPIO_NUM_38
|
||||||
#define TDECK_RADIO_PIN_CS GPIO_NUM_36
|
#define TPAGER_RADIO_PIN_CS GPIO_NUM_36
|
||||||
|
|
||||||
std::shared_ptr<SdCardDevice> createTpagerSdCard() {
|
std::shared_ptr<SdCardDevice> createTpagerSdCard() {
|
||||||
auto* configuration = new SpiSdCardDevice::Config(
|
auto* configuration = new SpiSdCardDevice::Config(
|
||||||
TDECK_SDCARD_PIN_CS,
|
TPAGER_SDCARD_PIN_CS,
|
||||||
GPIO_NUM_NC,
|
GPIO_NUM_NC,
|
||||||
GPIO_NUM_NC,
|
GPIO_NUM_NC,
|
||||||
GPIO_NUM_NC,
|
GPIO_NUM_NC,
|
||||||
SdCardDevice::MountBehaviour::AtBoot,
|
SdCardDevice::MountBehaviour::AtBoot,
|
||||||
tt::lvgl::getSyncLock(),
|
tt::lvgl::getSyncLock(),
|
||||||
{TDECK_RADIO_PIN_CS,
|
{TPAGER_RADIO_PIN_CS,
|
||||||
TDECK_LCD_PIN_CS}
|
TPAGER_LCD_PIN_CS}
|
||||||
);
|
);
|
||||||
|
|
||||||
auto* sdcard = (SdCardDevice*)new SpiSdCardDevice(
|
auto* sdcard = (SdCardDevice*)new SpiSdCardDevice(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user