Update SSD1289 and SSD2119 drivers to support using CCM memory for stack when using DMA.
Use GDISP_NO_DMA_FROM_STACK.
This commit is contained in:
parent
05354e057d
commit
e5d69abf02
6 changed files with 42 additions and 12 deletions
|
@ -57,8 +57,13 @@ static inline uint16_t read_data(GDisplay *g) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GDISP_USE_DMA) || defined(__DOXYGEN__)
|
//Optional define if your board interface supports it
|
||||||
//#error "GDISP - SSD1289: This interface does not support DMA"
|
//#define GDISP_USE_DMA TRUE
|
||||||
|
|
||||||
|
// Optional define - valid only when GDISP_USE_DMA is TRUE
|
||||||
|
//#define GDISP_NO_DMA_FROM_STACK FALSE
|
||||||
|
|
||||||
|
#if defined(GDISP_USE_DMA) && GDISP_USE_DMA
|
||||||
|
|
||||||
static inline void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
|
static inline void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
|
||||||
(void) g;
|
(void) g;
|
||||||
|
|
|
@ -31,6 +31,12 @@
|
||||||
#ifndef GDISP_INITIAL_BACKLIGHT
|
#ifndef GDISP_INITIAL_BACKLIGHT
|
||||||
#define GDISP_INITIAL_BACKLIGHT 100
|
#define GDISP_INITIAL_BACKLIGHT 100
|
||||||
#endif
|
#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. */
|
/* Driver local functions. */
|
||||||
|
@ -229,9 +235,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GDISP_HARDWARE_FILLS && defined(GDISP_USE_DMA)
|
#if GDISP_HARDWARE_FILLS && GDISP_USE_DMA
|
||||||
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
|
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);
|
c = gdispColor2Native(g->p.color);
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
|
@ -242,7 +252,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GDISP_HARDWARE_BITFILLS && defined(GDISP_USE_DMA)
|
#if GDISP_HARDWARE_BITFILLS && GDISP_USE_DMA
|
||||||
#if GDISP_PIXELFORMAT != GDISP_LLD_PIXELFORMAT
|
#if GDISP_PIXELFORMAT != GDISP_LLD_PIXELFORMAT
|
||||||
#error "GDISP: SSD1289: BitBlit is only available in RGB565 pixel format"
|
#error "GDISP: SSD1289: BitBlit is only available in RGB565 pixel format"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define GDISP_HARDWARE_STREAM_POS TRUE
|
#define GDISP_HARDWARE_STREAM_POS TRUE
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
#define GDISP_HARDWARE_CONTROL TRUE
|
||||||
|
|
||||||
#if defined(GDISP_USE_DMA)
|
#if defined(GDISP_USE_DMA) && GDISP_USE_DMA
|
||||||
#define GDISP_HARDWARE_FILLS TRUE
|
#define GDISP_HARDWARE_FILLS TRUE
|
||||||
#if !defined(GDISP_PIXELFORMAT) || GDISP_PIXELFORMAT == 0x2565
|
#if !defined(GDISP_PIXELFORMAT) || GDISP_PIXELFORMAT == 0x2565
|
||||||
// Hardware BitBlts are only supported in native pixel format on this controller
|
// Hardware BitBlts are only supported in native pixel format on this controller
|
||||||
|
|
|
@ -57,8 +57,13 @@ static inline uint16_t read_data(GDisplay *g) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GDISP_USE_DMA) || defined(__DOXYGEN__)
|
//Optional define if your board interface supports it
|
||||||
//#error "GDISP - SSD2119: This interface does not support DMA"
|
//#define GDISP_USE_DMA TRUE
|
||||||
|
|
||||||
|
// Optional define - valid only when GDISP_USE_DMA is TRUE
|
||||||
|
//#define GDISP_NO_DMA_FROM_STACK FALSE
|
||||||
|
|
||||||
|
#if defined(GDISP_USE_DMA) && GDISP_USE_DMA
|
||||||
|
|
||||||
static inline void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
|
static inline void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
|
||||||
(void) g;
|
(void) g;
|
||||||
|
|
|
@ -31,6 +31,12 @@
|
||||||
#ifndef GDISP_INITIAL_BACKLIGHT
|
#ifndef GDISP_INITIAL_BACKLIGHT
|
||||||
#define GDISP_INITIAL_BACKLIGHT 100
|
#define GDISP_INITIAL_BACKLIGHT 100
|
||||||
#endif
|
#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"
|
#include "drivers/gdisp/SSD2119/ssd2119.h"
|
||||||
|
|
||||||
|
@ -265,9 +271,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GDISP_HARDWARE_FILLS && defined(GDISP_USE_DMA)
|
#if GDISP_HARDWARE_FILLS && GDISP_USE_DMA
|
||||||
LLDSPEC void gdisp_lld_fill_area(GDisplay* g) {
|
LLDSPEC void gdisp_lld_fill_area(GDisplay* g) {
|
||||||
|
#if GDISP_NO_DMA_FROM_STACK
|
||||||
|
static LLDCOLOR_TYPE c;
|
||||||
|
#else
|
||||||
LLDCOLOR_TYPE c;
|
LLDCOLOR_TYPE c;
|
||||||
|
#endif
|
||||||
|
|
||||||
c = gdispColor2Native(g->p.color);
|
c = gdispColor2Native(g->p.color);
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
|
@ -278,7 +288,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GDISP_HARDWARE_BITFILLS && defined(GDISP_USE_DMA)
|
#if GDISP_HARDWARE_BITFILLS && GDISP_USE_DMA
|
||||||
#if GDISP_PIXELFORMAT != GDISP_LLD_PIXELFORMAT
|
#if GDISP_PIXELFORMAT != GDISP_LLD_PIXELFORMAT
|
||||||
#error "GDISP: SSD2119: BitBlit is only available in RGB565 pixel format"
|
#error "GDISP: SSD2119: BitBlit is only available in RGB565 pixel format"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define GDISP_HARDWARE_STREAM_POS TRUE
|
#define GDISP_HARDWARE_STREAM_POS TRUE
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
#define GDISP_HARDWARE_CONTROL TRUE
|
||||||
|
|
||||||
#if defined(GDISP_USE_DMA)
|
#if defined(GDISP_USE_DMA) && GDISP_USE_DMA
|
||||||
#define GDISP_HARDWARE_FILLS TRUE
|
#define GDISP_HARDWARE_FILLS TRUE
|
||||||
#if !defined(GDISP_PIXELFORMAT) || GDISP_PIXELFORMAT == 0x2565
|
#if !defined(GDISP_PIXELFORMAT) || GDISP_PIXELFORMAT == 0x2565
|
||||||
// Hardware BitBlts are only supported in native pixel format on this controller
|
// Hardware BitBlts are only supported in native pixel format on this controller
|
||||||
|
|
Loading…
Add table
Reference in a new issue