mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 05:35:20 -05:00
Hosted: Improvements in the LCD code. (Roman Stolyarov)
* Kill LCD when turning off the backlight * Fix logic errors in lcd_enable() calls * Use ioctls instead of sysfs to twiddle lcd enable Change-Id: I6864ff63d87b747ac48719b0f4ba2de00333a1d3
This commit is contained in:
parent
cb9b5d3b50
commit
0a7b23097a
2 changed files with 31 additions and 21 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* \/ \/ \/ \/ \/
|
||||
*
|
||||
* Copyright (C) 2017 Marcin Bukat
|
||||
* Copyright (C) 2019 by Roman Stolyarov
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -28,6 +29,7 @@
|
|||
#include "backlight-target.h"
|
||||
#include "sysfs.h"
|
||||
#include "panic.h"
|
||||
#include "lcd.h"
|
||||
|
||||
static const char * const sysfs_bl_brightness =
|
||||
"/sys/class/backlight/pwm-backlight.0/brightness";
|
||||
|
|
@ -44,12 +46,18 @@ bool backlight_hw_init(void)
|
|||
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true);
|
||||
#endif
|
||||
sysfs_set_int(sysfs_bl_power, 0);
|
||||
}
|
||||
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
sysfs_set_int(sysfs_bl_power, 1);
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
void backlight_hw_brightness(int brightness)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue