   GD.wr16(REG_PCLK,     5   );
   GD.w = 320;
   GD.h = 480;
-}
-
-void loop()
-{
-  GD.ClearColorRGB(0x103000);
-  GD.Clear();
-  GD.cmd_text(GD.w / 2, GD.h / 2, 31, OPT_CENTER, "Hello world");
-  GD.swap();
+  Serial.print("ID: ");
+  Serial.println(GD.rd(REG_ID), HEX);
 }
 
 void out_8(uint8_t b)


void setup()
{
  Serial.begin(1000000); // JCB

  pinMode(CSX, OUTPUT);
  pinMode(DCX, OUTPUT);
  pinMode(SCL, OUTPUT);
  pinMode(SDA, OUTPUT);
  pinMode(SDO, INPUT);

  digitalWrite(CSX, HIGH);
  delay(100);

  ili9488_report();
  ili9488_rgb_mode();
  ili9488_report();

  Serial.println("GD init");
  GD.begin(0);

  Serial.println("Setting video timing for ILI9488");
  GD.wr16(REG_HCYCLE,   400 );
  GD.wr16(REG_HOFFSET,  40  );

#include <EEPROM.h>
#include <SPI.h>
#include <GD2.h>

#define CSX 6   // chip select, active low
#define DCX 5   // data/command select
#define SCL 13  // clock, rising edge
#define SDA 11  // data in to ILI9488
#define SDO 12  // data out from ILI9488

#define ILI9488_CMD_READ_ID1                    0xDA
#define ILI9488_CMD_READ_ID2                    0xDB
