fix(st7789): Remove backlight control from driver
Use backlight control introduced in #95
This commit is contained in:
parent
9d9fadf450
commit
3980e51f07
|
@ -96,27 +96,10 @@ void st7789_init(lv_disp_drv_t *drv)
|
||||||
cmd++;
|
cmd++;
|
||||||
}
|
}
|
||||||
|
|
||||||
st7789_enable_backlight(drv, true);
|
|
||||||
|
|
||||||
/* FIXME We're setting up the initial orientation in the cmd array */
|
/* FIXME We're setting up the initial orientation in the cmd array */
|
||||||
st7789_set_orientation(drv, ST7789_INITIAL_ORIENTATION);
|
st7789_set_orientation(drv, ST7789_INITIAL_ORIENTATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void st7789_enable_backlight(lv_disp_drv_t *drv, bool backlight)
|
|
||||||
{
|
|
||||||
#if ST7789_ENABLE_BACKLIGHT_CONTROL
|
|
||||||
uint32_t tmp = 0;
|
|
||||||
|
|
||||||
#if (ST7789_BCKL_ACTIVE_LVL==1)
|
|
||||||
tmp = backlight ? 1 : 0;
|
|
||||||
#else
|
|
||||||
tmp = backlight ? 0 : 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
display_port_backlight(drv, tmp);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The ST7789 display controller can drive 320*240 displays, when using a 240*240
|
/* The ST7789 display controller can drive 320*240 displays, when using a 240*240
|
||||||
* display there's a gap of 80px, we need to edit the coordinates to take into
|
* display there's a gap of 80px, we need to edit the coordinates to take into
|
||||||
* account that gap, this is not necessary in all orientations. */
|
* account that gap, this is not necessary in all orientations. */
|
||||||
|
|
|
@ -115,14 +115,6 @@ void st7789_init(lv_disp_drv_t *drv);
|
||||||
*/
|
*/
|
||||||
void st7789_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
|
void st7789_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
|
||||||
|
|
||||||
/**
|
|
||||||
* Control display backlight
|
|
||||||
*
|
|
||||||
* @param drv Pointer to lv_disp_drv_t being used
|
|
||||||
* @param backlight Backlight control
|
|
||||||
*/
|
|
||||||
void st7789_enable_backlight(lv_disp_drv_t *drv, bool backlight);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display updated callback
|
* Display updated callback
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue