Trying to use Pimoroni display with Pico 2 & Arduino Software

I am trying to use a Pimoroni 240x240 Square LCD with a Raspberry Pi Pico 2. I am using the Adafruit GFX library and the ST7789 driver. I am trying to get it to simply display a white screen, but the only thing it has done so far is turn on. I tried changing the SPI frequency, SPI mode, and bringing the Chip Select pin high, but none of those changes did anything. Here is the code I have right now:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>

#define DISP_CS 17 // GP17
#define DISP_RST 21 // GP21
#define DISP_DC 20 // GP20
#define DISP_BL 16
#define DISP_MOSI 19 // MOSI and Serial Clock
#define DISP_SCK 18

Adafruit_ST7789 display = Adafruit_ST7789(DISP_CS, DISP_DC, DISP_MOSI, DISP_SCK, DISP_RST);

void setup() {
  // put your setup code here, to run once:

  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH); // Turn on led
  pinMode(DISP_CS, OUTPUT);
  digitalWrite(DISP_CS, HIGH); // Pull chip select high
  pinMode(DISP_BL, OUTPUT);
  digitalWrite(DISP_BL, HIGH); // Turn on backlight

  Serial.begin(9600);
  Serial.println("Program Opened.");

  // Initiate display

  SPI.begin();

  display.init(240, 240, SPI_MODE0);
  display.setRotation(0);
  display.invertDisplay(false);

  display.fillScreen(ST77XX_WHITE);
}

void loop() {
  // put your main code here, to run repeatedly:

  draw();
}


void draw() {

}

I guess I should probably be using the Pico C SDK, but I prefer Arduino Software over it. Any help is appreciated :D

Hm, when I look at the source code of the Adafruit_ST7789 constructor, it initializes it’s superclass with fixed dimensions:

Adafruit_ST7789::Adafruit_ST7789(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk,
                                 int8_t rst)
    : Adafruit_ST77xx(240, 320, cs, dc, mosi, sclk, rst) {}

These dimensions also show up at various constants. So the 240x240 is internally treated as a 320x240, and your display.init() basically changes which part of the virtual 320x240 is used.

With this, there are a number of assumptions made in the driver which might not be correct for your specific screen (e.g. which part of the 320 pixels is actually used - left, centered, right).