Jump to content

SPFD54124B driver (Nokia 1616)


Recommended Posts

Posted

Hi all,

there is a little error in LLDSPEC void gdisp_lld_control(GDisplay *g).

the correct version is:


LLDSPEC void gdisp_lld_control(GDisplay *g)
{
/* The hardware is capable of supporting...
* GDISP_CONTROL_POWER - supported
* GDISP_CONTROL_ORIENTATION - supported
* GDISP_CONTROL_BACKLIGHT - unsupported
* GDISP_CONTROL_CONTRAST - unsupported
*/

switch(g->p.x) {
case GDISP_CONTROL_POWER:
if (g->g.Powermode == (powermode_t)g->p.ptr)
return;

switch((powermode_t)g->p.ptr) {
case powerOff:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_SLPIN);
release_bus(g);
break;

case powerOn:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_SLPOUT);
delayms(20);
write_index(g, SPFD54124B_CMD_NORON);
release_bus(g);
break;

case powerSleep:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_SLPOUT);
delayms(20);
release_bus(g);
break;

default:
return;
}

g->g.Powermode = (powermode_t)g->p.ptr;
return;

case GDISP_CONTROL_ORIENTATION:
if (g->g.Orientation == (orientation_t)g->p.ptr)
return;

switch((orientation_t)g->p.ptr) {
case GDISP_ROTATE_0:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_MADCTR);
write_index(g, 0x0100); //mod
release_bus(g);
g->g.Height = GDISP_SCREEN_HEIGHT;
g->g.Width = GDISP_SCREEN_WIDTH;
break;

case GDISP_ROTATE_90:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_MADCTR);
write_index(g, 0x01A0); //mod
release_bus(g);
g->g.Height = GDISP_SCREEN_WIDTH;
g->g.Width = GDISP_SCREEN_HEIGHT;
break;

case GDISP_ROTATE_180:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_MADCTR);
write_index(g, 0x01C0); //mod
release_bus(g);
g->g.Height = GDISP_SCREEN_HEIGHT;
g->g.Width = GDISP_SCREEN_WIDTH;
break;

case GDISP_ROTATE_270:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_MADCTR);
write_index(g, 0x0160); //mod
release_bus(g);
g->g.Height = GDISP_SCREEN_WIDTH;
g->g.Width = GDISP_SCREEN_HEIGHT;
break;

case GDISP_ROTATE_PORTRAIT:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_MADCTR);
write_index(g, 0x0100); //mod
release_bus(g);
g->g.Height = GDISP_SCREEN_HEIGHT;
g->g.Width = GDISP_SCREEN_WIDTH;
break;

case GDISP_ROTATE_LANDSCAPE:
acquire_bus(g);
write_index(g, SPFD54124B_CMD_MADCTR);
write_index(g, 0x01A0); //mod
release_bus(g);
g->g.Height = GDISP_SCREEN_WIDTH;
g->g.Width = GDISP_SCREEN_HEIGHT;
break;

default:
return;
}
g->g.Orientation = (orientation_t)g->p.ptr;
return;
}
}

I don't find any other error...

Bye

board_SPFD54124B_stm32f3.zip

Posted

Those changes have been put back into the repository.

I also removes the Portrait and Landscape orientation cases as they are handled automaticly by the higher level code.

I have also added your board file to the boards/addons/gdisp directory.

Thank-you.

  • 3 years later...
Posted
Hello everyone, I would like some help with the 1616 nokia display with the SPFD54124B controller,

For more information, click here atmega 328 16 MHz using an arduino IDE. I'm new to this and I'm learning.

my email. lucio_0709@hotmail.com
Guest
This topic is now closed to further replies.
×
×
  • Create New...