co5300.h

C source for Emulating a round-screen ESP32 board, 15 lines. Raw file

#pragma once
#include <stdint.h>

// CO5300 AMOLED panel (466x466) driven over QSPI from SPI2. The esp_lcd QSPI
// panel-io sends each operation as GDMA transfers: a 4-byte command header
// {opcode, 0x00, cmd, 0x00} (opcode 0x02 = write-param, 0x32 = write-colour),
// then the parameter/pixel bytes. We decode CASET/RASET (the write window) and
// RAMWR (RGB565 pixels, byte-swapped as the app packs them) into frame memory.
#define CO5300_W 466
#define CO5300_H 466

void            co5300_spi2_xfer(const uint8_t *data, uint32_t len);
const uint16_t *co5300_fb(void);
void            co5300_rgba(uint8_t *out /* W*H*4 */);
void            co5300_dump_ppm(const char *path);