driver/vfd.cpp: add buttons backlight control

This commit is contained in:
[CST] Focus
2013-07-18 14:38:39 +04:00
parent baf2df01dd
commit cde862081f
2 changed files with 11 additions and 0 deletions

View File

@@ -199,6 +199,16 @@ void CVFD::setled(int led1, int led2){
}
}
void CVFD::setBacklight(bool on_off)
{
f(cs_get_revision() != 9)
return;
int led = on_off ? FP_LED_3_ON : FP_LED_3_OFF;
if (ioctl(fd, IOC_FP_LED_CTRL, led) < 0)
perror("FP_LED_3");
}
void CVFD::setled(bool on_off)
{
if(g_settings.led_rec_mode == 0)

View File

@@ -106,6 +106,7 @@ class CVFD
void setlcdparameter(void);
void setled(void);
void setled(bool on_off);
void setBacklight(bool on_off);
static CVFD* getInstance();
void init(const char * fontfile, const char * fontname);