|
PebbleOS
|
Ambient light sensor driver operations, called with the device lock held. More...
#include <als.h>
Data Fields | |
| int(* | init )(const struct pbl_als *als) |
| Bring the hardware up. | |
| int(* | read )(const struct pbl_als *als, uint32_t *level) |
| Read the light level, in raw counts. | |
| int(* | set_state )(const struct pbl_als *als, bool active, bool sampling) |
| Optional. | |
Ambient light sensor driver operations, called with the device lock held.
| int(* pbl_als_ops::init) (const struct pbl_als *als) |
Bring the hardware up.
Returns 0, -ENODEV if the part does not answer, or a negative errno.
| int(* pbl_als_ops::read) (const struct pbl_als *als, uint32_t *level) |
Read the light level, in raw counts.
| int(* pbl_als_ops::set_state) (const struct pbl_als *als, bool active, bool sampling) |
Optional.
Apply the sampling state: active while primed, sampling while primed and not suspended.