Fixing SSD2119 orientation bug
This commit is contained in:
parent
32ab371e4e
commit
d8e46a098d
@ -158,7 +158,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g) {
|
|||||||
gfxSleepMicroseconds(5);
|
gfxSleepMicroseconds(5);
|
||||||
|
|
||||||
// Configure pixel color format and MCU interface parameters.
|
// Configure pixel color format and MCU interface parameters.
|
||||||
write_reg(g, SSD2119_REG_ENTRY_MODE, 0x6838); // ENTRY_MODE_DEFAULT
|
write_reg(g, SSD2119_REG_ENTRY_MODE, 0x6830); // ENTRY_MODE_DEFAULT
|
||||||
gfxSleepMicroseconds(5);
|
gfxSleepMicroseconds(5);
|
||||||
|
|
||||||
// Set analog parameters.
|
// Set analog parameters.
|
||||||
@ -365,8 +365,8 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g) {
|
|||||||
switch((orientation_t)g->p.ptr) {
|
switch((orientation_t)g->p.ptr) {
|
||||||
case GDISP_ROTATE_0:
|
case GDISP_ROTATE_0:
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
/* ID = 11 AM = 1 */
|
/* ID = 11 AM = 0 */
|
||||||
write_reg(g, SSD2119_REG_ENTRY_MODE, 0x6838);
|
write_reg(g, SSD2119_REG_ENTRY_MODE, 0x6830);
|
||||||
release_bus(g);
|
release_bus(g);
|
||||||
g->g.Height = GDISP_SCREEN_HEIGHT;
|
g->g.Height = GDISP_SCREEN_HEIGHT;
|
||||||
g->g.Width = GDISP_SCREEN_WIDTH;
|
g->g.Width = GDISP_SCREEN_WIDTH;
|
||||||
|
Loading…
Reference in New Issue
Block a user