Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fleur
firmware
Commits
feb7a097
Verified
Commit
feb7a097
authored
Aug 26, 2019
by
Rahix
Browse files
fix(display): Don't require locking for backlight
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
e99d829f
Changes
2
Hide whitespace changes
Inline
Side-by-side
epicardium/epicardium.h
View file @
feb7a097
...
@@ -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
));
...
...
epicardium/modules/display.c
View file @
feb7a097
...
@@ -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
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment