diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-12-17 10:49:09 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-12-17 10:49:09 +1000 |
commit | e5d69abf020920c31cc721547cf5f0fb9ff9975c (patch) | |
tree | 2325b80cfc4f5c524ea62f6eb8925935fb5366be /drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c | |
parent | 05354e057d59b3d6fe47a6e3c0c979080b091108 (diff) | |
download | uGFX-e5d69abf020920c31cc721547cf5f0fb9ff9975c.tar.gz uGFX-e5d69abf020920c31cc721547cf5f0fb9ff9975c.tar.bz2 uGFX-e5d69abf020920c31cc721547cf5f0fb9ff9975c.zip |
Update SSD1289 and SSD2119 drivers to support using CCM memory for stack when using DMA.
Use GDISP_NO_DMA_FROM_STACK.
Diffstat (limited to 'drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c')
-rw-r--r-- | drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c index 36deeb90..5a789548 100644 --- a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c +++ b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c @@ -31,6 +31,12 @@ #ifndef GDISP_INITIAL_BACKLIGHT #define GDISP_INITIAL_BACKLIGHT 100 #endif +#ifndef GDISP_USE_DMA + #define GDISP_USE_DMA FALSE +#endif +#ifndef GDISP_NO_DMA_FROM_STACK + #define GDISP_NO_DMA_FROM_STACK FALSE +#endif #include "drivers/gdisp/SSD2119/ssd2119.h" @@ -265,9 +271,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g) { } #endif -#if GDISP_HARDWARE_FILLS && defined(GDISP_USE_DMA) +#if GDISP_HARDWARE_FILLS && GDISP_USE_DMA LLDSPEC void gdisp_lld_fill_area(GDisplay* g) { - LLDCOLOR_TYPE c; + #if GDISP_NO_DMA_FROM_STACK + static LLDCOLOR_TYPE c; + #else + LLDCOLOR_TYPE c; + #endif c = gdispColor2Native(g->p.color); acquire_bus(g); @@ -278,7 +288,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g) { } #endif -#if GDISP_HARDWARE_BITFILLS && defined(GDISP_USE_DMA) +#if GDISP_HARDWARE_BITFILLS && GDISP_USE_DMA #if GDISP_PIXELFORMAT != GDISP_LLD_PIXELFORMAT #error "GDISP: SSD2119: BitBlit is only available in RGB565 pixel format" #endif |