Merge pull request #218 from ProgramMax/main

Improve ST7789 frame rate ~4x
This commit is contained in:
Philip Howard 2021-12-08 15:50:48 +00:00 committed by GitHub
commit 9f6ddb86ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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() {