diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-02-27 17:44:21 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-02-27 17:44:21 +1000 |
commit | f265924396167729e8d9fb36a0383263f36c1270 (patch) | |
tree | 28843eb24b18999cf0217ecb0fe935f133901066 /drivers/gdisp/RA6963/gdisp_lld_RA6963.c | |
parent | 14786e97b618b8bc2a0ff1c732d45288fe550e33 (diff) | |
download | uGFX-f265924396167729e8d9fb36a0383263f36c1270.tar.gz uGFX-f265924396167729e8d9fb36a0383263f36c1270.tar.bz2 uGFX-f265924396167729e8d9fb36a0383263f36c1270.zip |
First set of V3 macro changes
Diffstat (limited to 'drivers/gdisp/RA6963/gdisp_lld_RA6963.c')
-rwxr-xr-x | drivers/gdisp/RA6963/gdisp_lld_RA6963.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gdisp/RA6963/gdisp_lld_RA6963.c b/drivers/gdisp/RA6963/gdisp_lld_RA6963.c index 2a983a65..7cf741d6 100755 --- a/drivers/gdisp/RA6963/gdisp_lld_RA6963.c +++ b/drivers/gdisp/RA6963/gdisp_lld_RA6963.c @@ -117,16 +117,16 @@ #define RA6963_TEXT_HOME (RA6963_GRAPHIC_HOME + RA6963_GRAPHIC_SIZE)
//#define RA6963_OFFSET_REGISTER 2
-#if (RA6963_NEED_READ == FALSE)
-#define BUFFSZ (RA6963_GRAPHIC_SIZE)
-#define RAM(g) ((uint8_t *)g->priv)
-#define POS (((g->p.x) / RA6963_FONT_WIDTH) + ((g->p.y) * RA6963_GRAPHIC_AREA))
+#if !RA6963_NEED_READ
+ #define BUFFSZ (RA6963_GRAPHIC_SIZE)
+ #define RAM(g) ((uint8_t *)g->priv)
+ #define POS (((g->p.x) / RA6963_FONT_WIDTH) + ((g->p.y) * RA6963_GRAPHIC_AREA))
#endif
#ifndef GDISP_INITIAL_CONTRAST
-#define GDISP_INITIAL_CONTRAST 50
+ #define GDISP_INITIAL_CONTRAST 50
#endif
#ifndef GDISP_INITIAL_BACKLIGHT
-#define GDISP_INITIAL_BACKLIGHT 100
+ #define GDISP_INITIAL_BACKLIGHT 100
#endif
@@ -142,11 +142,11 @@ /*===========================================================================*/
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
-#if (RA6963_NEED_READ == FALSE)
+#if RA6963_NEED_READ
+ g->priv = 0;
+#else
// The private area is the display surface.
g->priv = gfxAlloc(BUFFSZ);
-#else
- g->priv = 0;
#endif
// Initialise the board interface
init_board(g);
@@ -228,10 +228,10 @@ static void set_viewport(GDisplay *g) { LLDSPEC void gdisp_lld_write_color(GDisplay *g) {
uint8_t temp;
-#if (RA6963_NEED_READ == FALSE)
- temp = RAM(g)[POS];
-#else
+#if RA6963_NEED_READ
temp = read_data(g);
+#else
+ temp = RAM(g)[POS];
#endif
if (g->p.color != White) {
@@ -242,7 +242,7 @@ LLDSPEC void gdisp_lld_write_color(GDisplay *g) { }
write_data(g, temp);
-#if (RA6963_NEED_READ == FALSE)
+#if !RA6963_NEED_READ
RAM(g)[POS] = temp;
#endif
//write_cmd(g, RA6963_DATA_WRITE_AND_INCREMENT);
|