| 21 | } |
| 22 | |
| 23 | std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() { |
| 24 | // Create configuration |
| 25 | auto config = St7789i8080Display::Configuration( |
| 26 | DISPLAY_CS, // CS |
| 27 | DISPLAY_DC, // DC |
| 28 | DISPLAY_WR, // WR |
| 29 | DISPLAY_RD, // RD |
| 30 | { DISPLAY_I80_D0, DISPLAY_I80_D1, DISPLAY_I80_D2, DISPLAY_I80_D3, |
| 31 | DISPLAY_I80_D4, DISPLAY_I80_D5, DISPLAY_I80_D6, DISPLAY_I80_D7 }, // D0..D7 |
| 32 | DISPLAY_RST, // RST |
| 33 | DISPLAY_BL // BL |
| 34 | ); |
| 35 | |
| 36 | // Set resolution explicitly |
| 37 | config.horizontalResolution = DISPLAY_HORIZONTAL_RESOLUTION; |
| 38 | config.verticalResolution = DISPLAY_VERTICAL_RESOLUTION; |
| 39 | config.backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; |
| 40 | config.touch = createTouch(); |
| 41 | config.invertColor = false; |
| 42 | |
| 43 | auto display = std::make_shared<St7789i8080Display>(config); |
| 44 | return display; |
| 45 | } |
no test coverage detected