Skip to content

Commit

Permalink
Merge pull request #218 from ProgramMax/main
Browse files Browse the repository at this point in the history
Improve ST7789 frame rate ~4x
  • Loading branch information
Gadgetoid authored Dec 8, 2021
2 parents c322717 + 9e788f7 commit 9f6ddb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion drivers/st7789/st7789.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ namespace pimoroni {
uint bl = SPI_BG_FRONT_PWM;
uint vsync = PIN_UNUSED; // only available on some products

static const uint32_t SPI_BAUD = 16 * 1000 * 1000;
// The ST7789 requires 16 ns between SPI rising edges.
// 16 ns = 62,500,000 Hz
static const uint32_t SPI_BAUD = 62'500'000;

public:
// frame buffer where pixel data is stored
Expand Down
2 changes: 1 addition & 1 deletion libraries/pico_display_2/pico_display_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace pimoroni {
gpio_set_function(Y, GPIO_FUNC_SIO); gpio_set_dir(Y, GPIO_IN); gpio_pull_up(Y);

// initialise the screen
screen.init(true, false, 74 * 1000 * 1000);
screen.init(true, false);
}

void PicoDisplay2::update() {
Expand Down

0 comments on commit 9f6ddb8

Please sign in to comment.