aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-12-17 10:49:09 +1000
committerinmarket <andrewh@inmarket.com.au>2014-12-17 10:49:09 +1000
commite5d69abf020920c31cc721547cf5f0fb9ff9975c (patch)
tree2325b80cfc4f5c524ea62f6eb8925935fb5366be /drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
parent05354e057d59b3d6fe47a6e3c0c979080b091108 (diff)
downloaduGFX-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/SSD1289/gdisp_lld_SSD1289.c')
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
index d49e5268..0af1339e 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
+++ b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.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
/*===========================================================================*/
/* Driver local functions. */
@@ -229,9 +235,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) {
- uint16_t c;
+ #if GDISP_NO_DMA_FROM_STACK
+ static LLDCOLOR_TYPE c;
+ #else
+ LLDCOLOR_TYPE c;
+ #endif
c = gdispColor2Native(g->p.color);
acquire_bus(g);
@@ -242,7 +252,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: SSD1289: BitBlit is only available in RGB565 pixel format"
#endif