power manager
This commit is contained in:
parent
76625b646b
commit
b2a8500231
@ -177,8 +177,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
if (g->g.Powermode == (powermode_t)g->p.ptr)
|
if (g->g.Powermode == (powermode_t)g->p.ptr)
|
||||||
return;
|
return;
|
||||||
switch((powermode_t)g->p.ptr) {
|
switch((powermode_t)g->p.ptr) {
|
||||||
case powerOff: case powerOn: case powerSleep: case powerDeepSleep:
|
case powerOff:
|
||||||
//board_power(g, (powermode_t)g->p.ptr);
|
case powerSleep:
|
||||||
|
case powerDeepSleep:
|
||||||
|
write_index(g, PCF8812_SET_FUNC | PCF8812_PD);
|
||||||
|
break;
|
||||||
|
case powerOn:
|
||||||
|
write_index(g, PCF8812_SET_FUNC);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
@ -218,13 +223,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
|
|
||||||
case GDISP_CONTROL_BACKLIGHT:
|
case GDISP_CONTROL_BACKLIGHT:
|
||||||
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
|
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
|
||||||
//board_backlight(g, (unsigned)g->p.ptr);
|
set_backlight(g, (unsigned)g->p.ptr);
|
||||||
g->g.Backlight = (unsigned)g->p.ptr;
|
g->g.Backlight = (unsigned)g->p.ptr;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case GDISP_CONTROL_CONTRAST:
|
case GDISP_CONTROL_CONTRAST:
|
||||||
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
|
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
|
||||||
//board_contrast(g, (unsigned)g->p.ptr);
|
// ToDo
|
||||||
g->g.Contrast = (unsigned)g->p.ptr;
|
g->g.Contrast = (unsigned)g->p.ptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user