Fix GDISP_NEED_CONTROL for the STM32F429i-Discovery board.
This commit is contained in:
parent
523730bd08
commit
f793194e43
2 changed files with 13 additions and 36 deletions
|
@ -92,32 +92,9 @@ static inline void post_init_board(GDisplay *g) {
|
|||
(void) g;
|
||||
}
|
||||
|
||||
static inline void setpin_reset(GDisplay *g, bool_t state) {
|
||||
(void) g;
|
||||
(void) state;
|
||||
/*
|
||||
if(state) {
|
||||
// reset lcd
|
||||
palClearPad(GPIOE, GPIOE_LCD_RST);
|
||||
} else {
|
||||
palSetPad(GPIOE, GPIOE_LCD_RST);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
static inline void set_backlight(GDisplay *g, uint8_t percent) {
|
||||
(void) g;
|
||||
(void) percent;
|
||||
// TODO: can probably pwm this
|
||||
/*
|
||||
if(percent) {
|
||||
// turn back light on
|
||||
palSetPad(GPIOE, GPIOE_LCD_BLED);
|
||||
} else {
|
||||
// turn off
|
||||
palClearPad(GPIOE, GPIOE_LCD_BLED);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
static inline void acquire_bus(GDisplay *g) {
|
||||
|
|
|
@ -354,7 +354,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
|
|||
return;
|
||||
switch((powermode_t)g->p.ptr) {
|
||||
case powerOff: case powerOn: case powerSleep: case powerDeepSleep:
|
||||
board_power(g, (powermode_t)g->p.ptr);
|
||||
// TODO
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
@ -394,13 +394,13 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
|
|||
|
||||
case GDISP_CONTROL_BACKLIGHT:
|
||||
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;
|
||||
return;
|
||||
|
||||
case GDISP_CONTROL_CONTRAST:
|
||||
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;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue