diff options
author | root <root@ps-pc.(none)> | 2014-07-09 21:25:02 +0300 |
---|---|---|
committer | root <root@ps-pc.(none)> | 2014-07-09 21:25:02 +0300 |
commit | 0afcec1ddb9990b857ae06eadb8fbdbad86c9ca4 (patch) | |
tree | 7f63f362eef5c0122080accbab0b5502f3f6a6e2 | |
parent | 4611a10bc93031e45c739da646ec09bae16eaa64 (diff) | |
download | uGFX-0afcec1ddb9990b857ae06eadb8fbdbad86c9ca4.tar.gz uGFX-0afcec1ddb9990b857ae06eadb8fbdbad86c9ca4.tar.bz2 uGFX-0afcec1ddb9990b857ae06eadb8fbdbad86c9ca4.zip |
finish commit
-rw-r--r-- | drivers/gdisp/PCF8812/PCF8812.h | 2 | ||||
-rw-r--r-- | drivers/gdisp/PCF8812/gdisp_lld.mk | 2 | ||||
-rw-r--r-- | drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c | 28 |
3 files changed, 14 insertions, 18 deletions
diff --git a/drivers/gdisp/PCF8812/PCF8812.h b/drivers/gdisp/PCF8812/PCF8812.h index 95e7c217..3064f9b1 100644 --- a/drivers/gdisp/PCF8812/PCF8812.h +++ b/drivers/gdisp/PCF8812/PCF8812.h @@ -13,7 +13,7 @@ #define PCF8812_V 0x02 #define PCF8812_PD 0x04 -#define PCF8812_DISPLAY 0x08 +#define PCF8812_SET_DISPLAY 0x08 #define PCF8812_DISPLAY_MODE_BLANK 0x00 // bit D = 0, E = 0 #define PCF8812_DISPLAY_MODE_FILL 0x01 // bit D = 0, E = 1 #define PCF8812_DISPLAY_MODE_NORMAL 0x04 // bit D = 1, E = 0 diff --git a/drivers/gdisp/PCF8812/gdisp_lld.mk b/drivers/gdisp/PCF8812/gdisp_lld.mk deleted file mode 100644 index f2394eaf..00000000 --- a/drivers/gdisp/PCF8812/gdisp_lld.mk +++ /dev/null @@ -1,2 +0,0 @@ -GFXINC += $(GFXLIB)/drivers/gdisp/PCF8812 -GFXSRC += $(GFXLIB)/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c diff --git a/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c b/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c index 2fcff54b..5377b7cd 100644 --- a/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c +++ b/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c @@ -72,15 +72,14 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { acquire_bus(g); - write_index(g, PCF8812_SET_FUNC | PCF8812_H); - write_index(g, PCF8812_SET_BIAS | PCF8812_BIAS_MODE_7); - write_index(g, PCF8812_SET_TEMP | PCF8812_TEMP_MODE_2); - write_index(g, PCF8812_SET_VMULT | PCF8812_VMULT_MODE_0); - write_index(g, PCF8812_SET_VOP | 0xFF); - write_index(g, PCF8812_SET_FUNC); - write_index(g, PCF8812_DISPLAY | PCF8812_DISPLAY_MODE_NORMAL); - write_index(g, PCF8812_SET_X); // X = 0 - write_index(g, PCF8812_SET_Y); // Y = 0 + write_cmd(g, PCF8812_SET_FUNC | PCF8812_H); + write_cmd(g, PCF8812_SET_TEMP | PCF8812_TEMP_MODE_2); + write_cmd(g, PCF8812_SET_BIAS | PCF8812_BIAS_MODE_4); + write_cmd(g, PCF8812_SET_VOP | (0x40)); + write_cmd(g, PCF8812_SET_FUNC); + write_cmd(g, PCF8812_SET_DISPLAY | PCF8812_DISPLAY_MODE_NORMAL); + write_cmd(g, PCF8812_SET_X); // X = 0 + write_cmd(g, PCF8812_SET_Y); // Y = 0 coord_t i; @@ -118,8 +117,8 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { acquire_bus(g); - write_index(g, PCF8812_SET_X | 0); // X = 0 - write_index(g, PCF8812_SET_Y | 0); // Y = 0 + write_cmd(g, PCF8812_SET_X | 0); // X = 0 + write_cmd(g, PCF8812_SET_Y | 0); // Y = 0 coord_t i; @@ -144,7 +143,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { break; case GDISP_ROTATE_90: x = g->p.y; - y = (g->g.Width - g->p.x - 1); + y = g->g.Width - g->p.x - 1; break; case GDISP_ROTATE_180: x = g->g.Width - g->p.x - 1; @@ -180,10 +179,10 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { case powerOff: case powerSleep: case powerDeepSleep: - write_index(g, PCF8812_SET_FUNC | PCF8812_PD); + write_cmd(g, PCF8812_SET_FUNC | PCF8812_PD); break; case powerOn: - write_index(g, PCF8812_SET_FUNC); + write_cmd(g, PCF8812_SET_FUNC); break; default: return; @@ -229,7 +228,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { case GDISP_CONTROL_CONTRAST: if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100; - // ToDo g->g.Contrast = (unsigned)g->p.ptr; return; } |