|
PebbleOS v4.48.0-75-g7416f78a1
|
#include <stdbool.h>#include <stdint.h>Data Structures | |
| struct | pbl_als_scale |
| Raw count to lux calibration: lux = (raw - offset) * num / den. More... | |
Macros | |
| #define | PBL_ALS_LEVEL_MAX 0U |
Upper bound of the raw light level scale (CONFIG_ALS_BITS bits). | |
Functions | |
| bool | pbl_als_is_ready (const struct pbl_als *als) |
| Check whether the sensor is ready. | |
| int | pbl_als_read (const struct pbl_als *als, uint32_t *level) |
| Read the light level. | |
| void | pbl_als_prime (const struct pbl_als *als) |
| Announce that readings will be wanted soon. | |
| void | pbl_als_release (const struct pbl_als *als) |
| Drop a reference taken with pbl_als_prime(). | |
| void | pbl_als_suspend (const struct pbl_als *als) |
| Stop sampling until the matching pbl_als_resume(). | |
| void | pbl_als_resume (const struct pbl_als *als) |
| Drop a reference taken with pbl_als_suspend(). | |
| bool | pbl_als_has_lux (const struct pbl_als *als) |
| Check whether the sensor is calibrated to lux. | |
| uint32_t | pbl_als_to_lux (const struct pbl_als *als, uint32_t level) |
| Convert a light level to lux. | |
Variables | |
| const struct pbl_als *const | ALS |
| The board's ambient light sensor. | |