Ambient light and UV index sensor#
Ambient light and UV index sensor driver abstraction designed for Thunderboard.
Functions#
Function Documentation#
sl_sensor_light_init#
sl_status_t sl_sensor_light_init (void )
N/A |
Initialize ambient light and UV index sensor.
Note
With certain boards (e.g. 4166A, 4184A), 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.
49
of file common/sensor_light/sl_sensor_light.h
sl_sensor_light_deinit#
void sl_sensor_light_deinit (void )
N/A |
Deinitialize ambient light and UV index sensor.
Warnings
With certain boards (e.g. 4166A, 4184A), using this deinitialization function disables other sensors, because they're on the same enable pin. Please use with caution.
58
of file common/sensor_light/sl_sensor_light.h
sl_sensor_light_get#
sl_status_t sl_sensor_light_get (float * lux, float * uvi)
[out] | lux | Ambient light illuminance (in lux). |
[out] | uvi | UV index. |
Getter for ambient light and UV index sensor measurement data. Returns
Status of the operation.
66
of file common/sensor_light/sl_sensor_light.h
sl_sensor_light_set#
void sl_sensor_light_set (float lux, float uvi)
[in] | lux | Ambient light illuminance (in lux). |
[in] | uvi | UV index. |
Setter for ambient light and UV index.
46
of file common/sensor_light/sl_sensor_light_lux_mock.h
sl_sensor_lux_set#
void sl_sensor_lux_set (float lux)
[in] | lux | Ambient light illuminance (in lux). |
Setter for ambient light.
52
of file common/sensor_light/sl_sensor_light_lux_mock.h
Macro Definition Documentation#
SENSOR_LIGHT_POSITIVE_TOLERANCE#
#define SENSOR_LIGHT_POSITIVE_TOLERANCEValue:
0
46
of file common/sensor_light/config/sl_sensor_light_config.h
SENSOR_LIGHT_NEGATIVE_TOLERANCE#
#define SENSOR_LIGHT_NEGATIVE_TOLERANCEValue:
0
52
of file common/sensor_light/config/sl_sensor_light_config.h
SENSOR_LIGHT_SAMPLING_FUNCTION#
#define SENSOR_LIGHT_SAMPLING_FUNCTIONValue:
SAMPLING_UNSPECIFIED
66
of file common/sensor_light/config/sl_sensor_light_config.h
SENSOR_LIGHT_MEASUREMENT_PERIOD#
#define SENSOR_LIGHT_MEASUREMENT_PERIODValue:
0
72
of file common/sensor_light/config/sl_sensor_light_config.h
SENSOR_LIGHT_UPDATE_INTERVAL#
#define SENSOR_LIGHT_UPDATE_INTERVALValue:
0
78
of file common/sensor_light/config/sl_sensor_light_config.h