Verified Commit feb7a097 authored by Rahix's avatar Rahix
Browse files

fix(display): Don't require locking for backlight


Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent e99d829f
...@@ -1352,12 +1352,12 @@ API(API_DISP_FRAMEBUFFER, int epic_disp_framebuffer(union disp_framebuffer *fb)) ...@@ -1352,12 +1352,12 @@ API(API_DISP_FRAMEBUFFER, int epic_disp_framebuffer(union disp_framebuffer *fb))
/** /**
* Set the backlight brightness value * Set the backlight brightness.
* *
* :param brightness: brightness from 0 - 100 * Note that this function does not require acquiring the display.
* :return: ``0`` on success or negative value in case of an error:
* *
* - ``-EBUSY``: Display was already locked from another task. * :param brightness: brightness from 0 - 100
* :return: ``0`` on success or negative value in case of an error
*/ */
API(API_DISP_BACKLIGHT, int epic_disp_backlight(uint16_t brightness)); API(API_DISP_BACKLIGHT, int epic_disp_backlight(uint16_t brightness));
......
...@@ -173,11 +173,7 @@ int epic_disp_framebuffer(union disp_framebuffer *fb) ...@@ -173,11 +173,7 @@ int epic_disp_framebuffer(union disp_framebuffer *fb)
int epic_disp_backlight(uint16_t brightness) int epic_disp_backlight(uint16_t brightness)
{ {
int cl = check_lock(); /* TODO: lock? */
if (cl < 0) {
return cl;
}
LCD_SetBacklight(brightness); LCD_SetBacklight(brightness);
return 0; return 0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment