|
Looks like I am digging up stale threads lately, but I have started looking into this so I thought I would post what I found. Might be helpful to others, but its also a way to not loose my notes on the matter.
The emWin software driver calls the PSoC graphics components via some macros -- they can be found in the .h header file for the graphics LCD components once it is generated. They look like this, where INSTANCE is the name of your component for the parallel interface component psoc5:
#define CYGRAPHICS_START() INSTANCE_Start()
#define CYGRAPHICS_STOP() INSTANCE_Stop()
#define CYGRAPHICS_WRITE(addr, data) INSTANCE_Write8(addr, data)
#define CYGRAPHICS_READ(addr) INSTANCE_Read8(addr)
#define CYGRAPHICS_WRITEM(addr, data, num) INSTANCE_WriteM8(addr, data, num)
they are slighly different for the other graphics component that implements the controller in the PSoC
The CYGRAPHICS routines are called from LCDConf.c. I think, though I have not yet been successful, that these routines can be adapted to use other controllers. For instance, I have a SPI connected module, and I am able to write to the display because I substituded the SPI routines for the graphics writes, though to be honest, its total garbage being displayed at the moment. I took a slightly different approach and enabled 3-wire serial in the compact color driver (as discussed in the emWin documentation). It is necessary to note that some features cannot be used with 3 wire because emWin requires read and write access to the display memory (sprites, nors, etc).
I am toying with the idea of allocating a frame buffer in psoc ram that emWin will believe is the graphics ram, and work on that. This buffer can then be transmitted separately, perhaps with DMA setoff by a timer. Obvioulsy it would take a lot of ram, but a monochrome panel can maybe be bit packed, and if my math is correct, an 8bpp 126x64 OLED can be contained in 8192 bytes.
|