Ambient light sensor#
Ambient light sensor driver abstraction designed for Thunderboard.
Functions#
sl_status_t
sl_sensor_lux_init(void)
void
sl_sensor_lux_deinit(void)
sl_status_t
sl_sensor_lux_get(float *lux)
Function Documentation#
sl_sensor_lux_init#
sl_status_t sl_sensor_lux_init (void )
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Initialize ambient light sensor.
Note
With certain boards (e.g. 4184B), using this initialization function enables other sensors, because they're on the same enable pin. Please take that into account when using this function.
Returns
Status of the operation.
sl_sensor_lux_deinit#
void sl_sensor_lux_deinit (void )
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Deinitialize ambient light sensor.
Warnings
With certain boards (e.g. 4184B), using this deinitialization function disables other sensors, because they're on the same enable pin. Please use with caution.
sl_sensor_lux_get#
sl_status_t sl_sensor_lux_get (float * lux)
Parameters
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| float * | [out] | lux | Ambient light illuminance (in lux). |
Getter for ambient light sensor measurement data. Returns
Status of the operation.