diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-10-21 17:11:46 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-10-21 17:11:46 +1000 |
commit | 1b3297aeaebdfec5bf8c507ed88445585a0952de (patch) | |
tree | b431c05e0baecfe4dd5a277e4a3438e1cdcd7bce /drivers/gdisp/Nokia6610GE12 | |
parent | 0698fd28c03e20704376cf6c97f373ba9c5e8c4b (diff) | |
download | uGFX-1b3297aeaebdfec5bf8c507ed88445585a0952de.tar.gz uGFX-1b3297aeaebdfec5bf8c507ed88445585a0952de.tar.bz2 uGFX-1b3297aeaebdfec5bf8c507ed88445585a0952de.zip |
Fix a bug in Contrast handling in the Nokia drivers
Diffstat (limited to 'drivers/gdisp/Nokia6610GE12')
-rw-r--r-- | drivers/gdisp/Nokia6610GE12/gdisp_lld.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gdisp/Nokia6610GE12/gdisp_lld.c b/drivers/gdisp/Nokia6610GE12/gdisp_lld.c index 25f26c69..ef8cd043 100644 --- a/drivers/gdisp/Nokia6610GE12/gdisp_lld.c +++ b/drivers/gdisp/Nokia6610GE12/gdisp_lld.c @@ -115,7 +115,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { write_index(g, SLEEPOUT); // Sleep out write_reg(g, COLMOD, 0x03); // Color Interface Pixel Format - 0x03 = 12 bits-per-pixel write_reg(g, MADCTL, 0x00); // Memory access controller - write_reg(g, SETCON, 127*GDISP_INITIAL_CONTRAST/100-64); // Write contrast + write_reg(g, SETCON, 128*GDISP_INITIAL_CONTRAST/101-64); // Write contrast delayms(20); // Finish Init @@ -248,7 +248,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { case GDISP_CONTROL_CONTRAST: if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100; acquire_bus(g); - write_reg(g, CONTRAST,(unsigned)127*g->p.ptr/100-64); + write_reg(g, CONTRAST,(unsigned)128*g->p.ptr/101-64); release_bus(g); g->g.Contrast = (unsigned)g->p.ptr; return; |