BSB Developer Docs
Loading...
Searching...
No Matches
light_sensor.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <core/state.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15#define RECORD_LIGHT_SENSOR "light_sensor"
16
20typedef struct LightSensor LightSensor;
21
29
38FuriState* light_sensor_get_state(LightSensor* instance);
39
49 LightSensor* instance,
51 uint16_t* raw);
52
60bool light_sensor_sleep(LightSensor* instance, bool sleep);
61
62#ifdef __cplusplus
63}
64#endif
bool light_sensor_get_raw_data(LightSensor *instance, LightSensorLightWavelength wavelength, uint16_t *raw)
Get the raw light sensor value.
Definition light_sensor.c:130
FuriState * light_sensor_get_state(LightSensor *instance)
Get the state object containing the current light levels.
Definition light_sensor.c:125
LightSensorLightWavelength
Light sensor wavelengths.
Definition light_sensor.h:25
@ LightSensorLightWavelength840nm
840nm wavelength
Definition light_sensor.h:27
@ LightSensorLightWavelength600nm
600nm wavelength
Definition light_sensor.h:26
bool light_sensor_sleep(LightSensor *instance, bool sleep)
Enter low-power sleep mode.
Definition light_sensor.c:151
Definition light_sensor.c:16