-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplayConfiguration.h
More file actions
63 lines (54 loc) · 4.01 KB
/
Copy pathDisplayConfiguration.h
File metadata and controls
63 lines (54 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef _DISPLAY_CONFIGURATION_h
#define _DISPLAY_CONFIGURATION_h
#include <EgfxScreenDrivers.h>
#include <EgfxFramebuffers.h>
#include <EgfxPlatformPresets.h>
// Configuration, based on display wiring and platform. Uncomment the desired pin configuration.
#if defined(STM32H7xx)
using DisplayConfig = Egfx::PlatformPresets::Configs::STM32H7_SPI_GENERIC;
#elif defined(STM32F4)
using DisplayConfig = Egfx::PlatformPresets::Configs::STM32F4_SPI_GENERIC;
#elif defined(ARDUINO_ARCH_STM32F1) || defined(STM32F1)
using DisplayConfig = Egfx::PlatformPresets::Configs::STM32F1_SPI_GENERIC;
#elif defined(ARDUINO_ARCH_AVR)
using DisplayConfig = Egfx::PlatformPresets::Configs::AVR_I2C_GENERIC;
#elif defined(ARDUINO_ARCH_ESP32)
using DisplayConfig = Egfx::PlatformPresets::Configs::ESP32_SPI_GENERIC;
#elif defined(ARDUINO_SEEED_XIAO_RP2350)
using DisplayConfig = Egfx::PlatformPresets::Configs::RP2350_XIAO_SPI_GENERIC;
#elif defined(ARDUINO_ARCH_RP2040)
using DisplayConfig = Egfx::PlatformPresets::Configs::RP2350_SPI_GENERIC;
#elif defined(ARDUINO_ARCH_NRF52)
using DisplayConfig = Egfx::PlatformPresets::Configs::NRF52_SPI_GENERIC;
#endif
// Display options definition. Adjust as needed and add to Framebuffer type definition below.
using EgfxOptions = Egfx::DisplayOptions::TemplateOptions<
Egfx::DisplayOptions::MirrorEnum::None,
Egfx::DisplayOptions::RotationEnum::None,
false
>;
// Uncomment Driver and matching Framebuffer type. Drivers will have Async, DMA, and RTOS variants, depending on the platform.
//using ScreenDriverType = Egfx::ScreenDriverSSD1306_64x32x1_I2C;
//using ScreenDriverType = Egfx::ScreenDriverSSD1306_64x48x1_I2C;
//using ScreenDriverType = Egfx::ScreenDriverSSD1306_72x40x1_I2C;
//using ScreenDriverType = Egfx::ScreenDriverSSD1306_128x32x1_I2C;
using ScreenDriverType = Egfx::ScreenDriverSSD1306_128x64x1_I2C;
//using ScreenDriverType = Egfx::ScreenDriverSH1107_128x128x1_I2C;
using FramebufferType = Egfx::BinaryFramebuffer<ScreenDriverType::ScreenWidth, ScreenDriverType::ScreenHeight, 0, 0, EgfxOptions>;
//using ScreenDriverType = Egfx::ScreenDriverSSD1306_128x64x1_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverSH1106_128x64x1_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverSH1106_132x64x1_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using FramebufferType = Egfx::BinaryFramebuffer<ScreenDriverType::ScreenWidth, ScreenDriverType::ScreenHeight, 0, 0, EgfxOptions>;
//using ScreenDriverType = Egfx::ScreenDriverSSD1331_96x64x8_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using FramebufferType = Egfx::Color8Framebuffer<ScreenDriverType::ScreenWidth, ScreenDriverType::ScreenHeight, 0, EgfxOptions>;
//using ScreenDriverType = Egfx::ScreenDriverSSD1331_96x64x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverSSD1351_128x128x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverST7735S_80x160x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverST7735S_160x128x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverST7789_172x320x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverST7789_240x240x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverST7789T3_240x320x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverGC9107_128x128x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using ScreenDriverType = Egfx::ScreenDriverGC9A01_240x240x16_SPI<DisplayConfig::CS, DisplayConfig::DC, DisplayConfig::RESET>;
//using FramebufferType = Egfx::Color16Framebuffer<ScreenDriverType::ScreenWidth, ScreenDriverType::ScreenHeight, 0, EgfxOptions>;
#endif