mirror of
https://github.com/stasenso/rp_pico_display_engine.git
synced 2026-06-26 21:32:41 +03:00
Tune EngineDemo display configuration
This commit is contained in:
@@ -52,7 +52,7 @@ set(DISPLAY_PIN_DC 12)
|
||||
set(DISPLAY_PIN_RST 11)
|
||||
set(DISPLAY_PIN_BL 10)
|
||||
# Available values: DISPLAY_TYPE_ST7789, DISPLAY_TYPE_ILI9341
|
||||
set(DISPLAY_TYPE "DISPLAY_TYPE_ILI9341" CACHE STRING "Display controller backend")
|
||||
set(DISPLAY_TYPE "DISPLAY_TYPE_ST7789" CACHE STRING "Display controller backend")
|
||||
set_property(CACHE DISPLAY_TYPE PROPERTY STRINGS DISPLAY_TYPE_ST7789 DISPLAY_TYPE_ILI9341)
|
||||
|
||||
# Pass display mapping into display backend without editing engine sources.
|
||||
|
||||
@@ -56,7 +56,7 @@ int main()
|
||||
display_config_t cfg = { // Формируем конфигурацию дисплейного движка.
|
||||
.width = WIDTH, // Передаем ширину кадра.
|
||||
.height = HEIGHT, // Передаем высоту кадра.
|
||||
.buffer_count = 2, // Используем два буфера кадра (SAFE режим блокирует доступ при DMA).
|
||||
.buffer_count = 1, // Используем два буфера кадра (SAFE режим блокирует доступ при DMA).
|
||||
.mode = DISPLAY_MODE_SAFE, // Выбираем безопасный режим работы буфера.
|
||||
};
|
||||
|
||||
@@ -112,7 +112,7 @@ int main()
|
||||
update_axis_reflect(&text3_x, &text3_dx, 0, WIDTH - text3_w); // Двигаем третью строку по X с отражением от левой/правой грани.
|
||||
update_axis_reflect(&text3_y, &text3_dy, 0, HEIGHT - TEXT_H); // Двигаем третью строку по Y с отражением от верхней/нижней грани.
|
||||
|
||||
phase += 0.16f; // Продвигаем фазу синусоиды для плавной анимации.
|
||||
phase += 0.08f; // Продвигаем фазу синусоиды для плавной анимации.
|
||||
if (phase > 6.2831853f) // Если фаза превысила 2*pi.
|
||||
{
|
||||
phase -= 6.2831853f; // Возвращаем фазу в базовый диапазон без скачка формы.
|
||||
|
||||
@@ -9,7 +9,7 @@ static int dma_chan = -1;
|
||||
|
||||
void display_transport_init(uint16_t width, uint16_t height, irq_handler_t dma_irq_handler)
|
||||
{
|
||||
spi_init(DISPLAY_SPI_PORT, 1000 * 100 * 75); /* 7.5 MHz */
|
||||
spi_init(DISPLAY_SPI_PORT, 1000 * 100 * 625); /* 150 MHz */
|
||||
spi_set_format(
|
||||
DISPLAY_SPI_PORT,
|
||||
8,
|
||||
|
||||
Reference in New Issue
Block a user