lights: Header file updates for ALS support codes
These changes adds ALS support to the lighting system Signed-off-by: Dan Murphy <D.Murphy@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
parent
24a9a66dba
commit
e00013c495
1 changed files with 15 additions and 0 deletions
15
include/hardware/lights.h
Normal file → Executable file
15
include/hardware/lights.h
Normal file → Executable file
|
@ -65,6 +65,15 @@ __BEGIN_DECLS
|
||||||
*/
|
*/
|
||||||
#define LIGHT_FLASH_TIMED 1
|
#define LIGHT_FLASH_TIMED 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use these definitions for the Ambient Light sensing modes. Manual will
|
||||||
|
* force the display brightness based on the slider bar. Automatic mode will
|
||||||
|
* force the system to control the lighting regions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ALS_MODE_MANUAL 0
|
||||||
|
#define ALS_MODE_AUTOMATIC 1
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The parameters that can be set for a given light.
|
* The parameters that can be set for a given light.
|
||||||
|
@ -107,6 +116,12 @@ struct light_device_t {
|
||||||
*/
|
*/
|
||||||
int (*set_light)(struct light_device_t* dev,
|
int (*set_light)(struct light_device_t* dev,
|
||||||
struct light_state_t const* state);
|
struct light_state_t const* state);
|
||||||
|
/**
|
||||||
|
* Set the global ambient light sensing value.
|
||||||
|
*
|
||||||
|
* Returns: 0 on succes, error code on failure.
|
||||||
|
*/
|
||||||
|
int (*set_als_mode)(int mode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue