TLDR;
How do I specify GDISP_HARDWARE_STREAM_WRITE configuration for the RA8875 display, but not the pixmap display?
-------------------------------
I have GDISP working with a RA8875 that is connected via SPI. However, I am running into issues trying to enable pixmap support. In particular, I'd like to draw to the pixmap display and then transfer the entire screen for enhanced performance when needed. So, after enabling pixmap support in my gfxconf.h, I get the following errors:
ugfx/src/gdisp/gdisp.c: In function 'gdispGStreamColor':
ugfx/src/gdisp/gdisp.c:824:6: error: 'GDisplay {aka struct GDisplay}' has no member named 'linebuf'
g->linebuf[g->p.cx++] = color;
^~
ugfx/src/gdisp/gdisp.c:826:6: error: 'sx1' undeclared (first use in this function)
sx1 = g->p.x1;
^~~
ugfx/src/gdisp/gdisp.c:826:6: note: each undeclared identifier is reported only once for each function it appears in
ugfx/src/gdisp/gdisp.c:827:6: error: 'sy1' undeclared (first use in this function); did you mean 'sx1'?
sy1 = g->p.y1;
^~~
sx1
ugfx/src/gdisp/gdisp.c:830:26: error: 'GDisplay {aka struct GDisplay}' has no member named 'linebuf'
g->p.ptr = (void *)g->linebuf;
^~
ugfx/src/gdisp/gdisp.c:845:27: error: 'GDisplay {aka struct GDisplay}' has no member named 'linebuf'
g->p.ptr = (void *)g->linebuf;
^~
ugfx/src/gdisp/gdisp.c: In function 'gdispGStreamStop':
ugfx/src/gdisp/gdisp.c:945:26: error: 'GDisplay {aka struct GDisplay}' has no member named 'linebuf'
g->p.ptr = (void *)g->linebuf;
^~
Looking in gdisp.c, I see:
void gdispGStreamColor(GDisplay *g, color_t color) {
#if !GDISP_HARDWARE_STREAM_WRITE && GDISP_LINEBUF_SIZE != 0 && GDISP_HARDWARE_BITFILLS
coord_t sx1, sy1;
#endif
This leads me to believe that I need to specify the GDISP_HARDWARE_STREAM_WRITE configuration for the RA8875 display only, but I'm not sure how.
For reference, I am building with Cmake and manually including files that I need. (So, not the same as the single include issue here:
For reference, here's my gxfconf.h (with all commented out lines removed for brevity) :
#ifndef _GFXCONF_H
#define _GFXCONF_H
#define GDISP_SCREEN_WIDTH 800
#define GDISP_SCREEN_HEIGHT 480
#define GDISP_INITIAL_CONTRAST 100
#define GDISP_INITIAL_BACKLIGHT 100
#define GFX_USE_OS_FREERTOS TRUE
#define GFX_COMPILER GFX_COMPILER_GCC
#define GFX_CPU GFX_CPU_CORTEX_M4_FP
#define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_LITTLE
#define GFX_OS_NO_INIT TRUE
#define GFX_OS_INIT_NO_WARNING TRUE
#define GFX_USE_GDISP TRUE
#define GDISP_NEED_MULTITHREAD TRUE
#define GDISP_NEED_STREAMING TRUE
#define GDISP_NEED_PIXMAP TRUE
#define GDISP_STARTUP_COLOR Black
#define GDISP_NEED_STARTUP_LOGO FALSE
#define GDISP_DRIVER_LIST GDISPVMT_RA8875, GDISPVMT_PIXMAP
#define GDISP_HARDWARE_CLEARS TRUE
#define GDISP_HARDWARE_FILLS TRUE
#define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB565
#endif /* _GFXCONF_H */