Allow initial driver settings to be overridden by the board file

ugfx_release_2.6
inmarket 2013-09-30 15:40:52 +10:00
parent 2c11cc3b94
commit dd54d42f00
2 changed files with 8 additions and 6 deletions

View File

@ -65,8 +65,8 @@
#undef GDISP_SCREEN_WIDTH #undef GDISP_SCREEN_WIDTH
#endif #endif
#include "GE8.h"
#include "gdisp_lld_board.h" #include "gdisp_lld_board.h"
#include "GE8.h"
#define GDISP_SCAN_LINES 132 #define GDISP_SCAN_LINES 132

View File

@ -19,6 +19,7 @@
#define GDISP_LLD_DECLARATIONS #define GDISP_LLD_DECLARATIONS
#include "gdisp/lld/gdisp_lld.h" #include "gdisp/lld/gdisp_lld.h"
#include "gdisp_lld_board.h"
/*===========================================================================*/ /*===========================================================================*/
/* Driver local definitions. */ /* Driver local definitions. */
@ -30,16 +31,17 @@
#ifndef GDISP_SCREEN_WIDTH #ifndef GDISP_SCREEN_WIDTH
#define GDISP_SCREEN_WIDTH 240 #define GDISP_SCREEN_WIDTH 240
#endif #endif
#ifndef GDISP_INITIAL_CONTRAST
#define GDISP_INITIAL_CONTRAST 50 #define GDISP_INITIAL_CONTRAST 50
#define GDISP_INITIAL_BACKLIGHT 100 #endif
#ifndef GDISP_INITIAL_BACKLIGHT
#define GDISP_INITIAL_BACKLIGHT 100
#endif
/*===========================================================================*/ /*===========================================================================*/
/* Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
#include "gdisp_lld_board.h"
// Some common routines and macros // Some common routines and macros
#define write_reg(reg, data) { write_index(reg); write_data(data); } #define write_reg(reg, data) { write_index(reg); write_data(data); }
#define delay(us) gfxSleepMicroseconds(us) #define delay(us) gfxSleepMicroseconds(us)