PebbleOS
Loading...
Searching...
No Matches
pbl_als_ops Struct Reference

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.
 

Detailed Description

Ambient light sensor driver operations, called with the device lock held.

Field Documentation

◆ init

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.

◆ read

int(* pbl_als_ops::read) (const struct pbl_als *als, uint32_t *level)

Read the light level, in raw counts.

◆ set_state

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.


The documentation for this struct was generated from the following file: