Home
last modified time | relevance | path

Searched full:light (Results 1 – 25 of 175) sorted by relevance

1234567

/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/
Dstate_binding.c42 uint16_t constrain_lightness(uint16_t light) in constrain_lightness() argument
44 if (light > 0 && light < ctl->light->range_min) { in constrain_lightness()
45 light = ctl->light->range_min; in constrain_lightness()
46 } else if (light > ctl->light->range_max) { in constrain_lightness()
47 light = ctl->light->range_max; in constrain_lightness()
50 return light; in constrain_lightness()
56 if (ctl->light->target > 0 && in constrain_target_lightness2()
57 ctl->light->target < ctl->light->range_min) { in constrain_target_lightness2()
58 if (ctl->light->delta < 0) { in constrain_target_lightness2()
59 ctl->light->target = 0U; in constrain_target_lightness2()
[all …]
Dtransition.c116 ctl->light->delta = in set_transition_values()
117 ((float) (ctl->light->current - ctl->light->target) / in set_transition_values()
121 ctl->light->delta = in set_transition_values()
122 ((float) (ctl->light->current - ctl->light->target) / in set_transition_values()
170 ctl->light->current -= ctl->light->delta; in onoff_work_handler()
173 ctl->light->current = ctl->light->target; in onoff_work_handler()
181 int light; in level_move_lightness_work_handler() local
183 light = 0; in level_move_lightness_work_handler()
185 if (ctl->light->current) { in level_move_lightness_work_handler()
186 light = ctl->light->current + ctl->light->delta; in level_move_lightness_work_handler()
[all …]
Dno_transition_work_handler.c47 if (ctl->light->target != ctl->light->current) { in no_transition_work_handler()
48 ctl->light->current = ctl->light->target; in no_transition_work_handler()
62 if (ctl->light->current) { in no_transition_work_handler()
63 ctl->light->last = ctl->light->current; in no_transition_work_handler()
Ddevice_composition.c45 struct lightness light; variable
50 .light = &light,
78 if (ctl->light->current == ctl->light->target) { in gen_onoff_get()
171 if (ctl->light->target != ctl->light->current) { in gen_onoff_set_unack()
179 ctl->light->current = ctl->light->target; in gen_onoff_set_unack()
241 if (ctl->light->target != ctl->light->current) { in gen_onoff_set()
250 ctl->light->current = ctl->light->target; in gen_onoff_set()
287 if (ctl->light->current == ctl->light->target) { in gen_level_get()
377 if (ctl->light->target != ctl->light->current) { in gen_level_set_unack()
385 ctl->light->current = ctl->light->target; in gen_level_set_unack()
[all …]
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/
Dmain.c26 ctl->light->range_min = LIGHTNESS_MIN; in light_default_var_init()
27 ctl->light->range_max = LIGHTNESS_MAX; in light_default_var_init()
28 ctl->light->last = LIGHTNESS_MAX; in light_default_var_init()
29 ctl->light->def = LIGHTNESS_MAX; in light_default_var_init()
30 ctl->light->target = ctl->light->def; in light_default_var_init()
45 if (ctl->light->range) { in light_default_status_init()
46 ctl->light->range_max = (uint16_t) (ctl->light->range >> 16); in light_default_status_init()
47 ctl->light->range_min = (uint16_t) ctl->light->range; in light_default_status_init()
56 ctl->light->last = constrain_lightness(ctl->light->last); in light_default_status_init()
57 ctl->light->def = constrain_lightness(ctl->light->def); in light_default_status_init()
[all …]
Dstorage.c36 settings_save_one("ps/ld", &ctl->light->def, sizeof(ctl->light->def)); in save_def_states()
43 settings_save_one("ps/ll", &ctl->light->last, sizeof(ctl->light->last)); in save_lightness_last_state()
50 settings_save_one("ps/llt", &ctl->light->target, in save_last_target_states()
51 sizeof(ctl->light->target)); in save_last_target_states()
62 ctl->light->range = (uint32_t) ((ctl->light->range_max << 16) | in save_lightness_range()
63 ctl->light->range_min); in save_lightness_range()
65 settings_save_one("ps/lr", &ctl->light->range, in save_lightness_range()
66 sizeof(ctl->light->range)); in save_lightness_range()
140 len = read_cb(cb_arg, &ctl->light->def, in ps_set()
141 sizeof(ctl->light->def)); in ps_set()
[all …]
/Zephyr-latest/samples/boards/espressif/light_sleep/
DREADME.rst1 .. zephyr:code-sample:: esp32-light-sleep
2 :name: Light Sleep
4 Use light sleep mode on ESP32 to save power while preserving the state of the memory, CPU, and
10 This example illustrates usage of light sleep mode. Unlike deep sleep mode,
11 light sleep preserves the state of the memory, CPU, and peripherals. Execution
13 When the chip exits light sleep mode, execution continues at the point where it
45 about 500 ms, after the second wakeup from light sleep. The program has
52 Entering light sleep
53 Returned from light sleep, reason: timer, t=3344 ms, slept for 2001 ms
54 Entering light sleep
[all …]
/Zephyr-latest/samples/sensor/isl29035/
DREADME.rst2 :name: ISL29035 Digital Light Sensor
5 Get light intensity data from an ISL29035 sensor (polling & trigger mode).
10 If trigger is not enabled the sample displays measured light intensity
13 If trigger is enabled the sample displays light intensity from the
43 [0:00:00.018] Ambient light sense: 365.234
44 [0:00:10.023] Ambient light sense: 361.084
47 [0:00:13.276] Ambient light sense: 302.734
50 [0:00:14.619] Ambient light sense: 247.62
53 [0:00:16.141] Ambient light sense: 187.927
56 [0:00:16.410] Ambient light sense: 126.953
[all …]
/Zephyr-latest/samples/sensor/apds9960/
DREADME.rst2 :name: APDS9960 RGB, ambient light, and gesture sensor
5 Get ambient light, RGB, and proximity/gesture data from an APDS9960 sensor.
11 ambient light, RGB, and proximity (or gesture) data. This sample checks the
32 ambient light intensity without trigger is 387
34 ambient light intensity without trigger is 386
36 ambient light intensity without trigger is 386
/Zephyr-latest/drivers/sensor/renesas/isl29035/
DKconfig1 # ISL29035 light sensor configuration options
7 bool "ISL29035 light sensor"
12 Enable driver for the ISL29035 light sensor.
47 The sampling period of the internal ADC of the light sensor.
69 configured either for either ambient light or infrared sensing.
72 bool "ambient light"
74 Sensing mode for ambient light spectrum.
89 Only available for ambient light sensing mode.
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/
DREADME.rst21 - Light Lightness Server
22 - Light Lightness Setup Server
23 - Light Lightness Client
24 - Light CTL Server
25 - Light CTL Setup Server
26 - Light CTL Client
33 - Light CTL Temperature Server
45 * LED3 is associated with generic Level (ROOT) / Light Lightness Actual value
46 * LED4 is associated with generic Level (Secondary) / Light CTL Temperature value
48 * Button3 and Button4 are associated with gen. Level Client / Light Lightness Client / Light CTL Cl…
/Zephyr-latest/tests/subsys/pm/power_mgmt_soc/src/
Dpower_mgmt.h11 /** @brief Alternates between light and deep sleep cycles.
13 * For light sleep, the test sleeps in main thread for 500 ms longer than
24 /** @brief Alternates between light and deep sleep cycles.
26 * Performs same approach to achieve light and deep sleep, but additional
36 * Performs a dummy initialization for the board to enter light/deep sleep
Dpower_mgmt.c27 * - for light it should be very little so that we get only into light sleep
236 /* Light sleep cycle */ in test_pwr_mgmt_multithread()
239 LOG_INF("About to enter light sleep"); in test_pwr_mgmt_multithread()
245 LOG_INF("Wake from Light Sleep"); in test_pwr_mgmt_multithread()
252 /* states in its residency policy will simply enter light */ in test_pwr_mgmt_multithread()
290 /* Trigger Light Sleep 1 state. 48MHz PLL stays on */ in test_pwr_mgmt_singlethread()
291 LOG_INF("About to enter light sleep"); in test_pwr_mgmt_singlethread()
296 LOG_INF("Wake from Light Sleep"); in test_pwr_mgmt_singlethread()
301 /* states in its residency policy will simply enter light */ in test_pwr_mgmt_singlethread()
329 LOG_INF("About to enter light sleep"); in test_dummy_init()
[all …]
/Zephyr-latest/drivers/sensor/maxim/max44009/
DKconfig1 # MAX44009 light sensor configuration options
7 bool "MAX44009 Light Sensor"
12 Enable driver for MAX44009 light sensors.
/Zephyr-latest/drivers/sensor/ti/opt3001/
DKconfig1 # OPT3001 light sensor configuration options
7 bool "OPT3001 Light Sensor"
12 Enable driver for OPT3001 light sensors.
/Zephyr-latest/drivers/sensor/rohm/bh1750/
DKconfig1 # BH1750 ambient light sensor configuration options
7 bool "BH1750 ambient light sensor"
12 Enable driver for BH1750 ambient light sensor.
/Zephyr-latest/drivers/sensor/vishay/veml7700/
DKconfig4 # Vishay VEML7700 ambient light sensor driver options.
7 bool "Vishay VEML7700 ambient light sensor"
12 Enable Vishay VEML7700 ambient light sensor driver.
/Zephyr-latest/drivers/sensor/ltrf216a/
DKconfig1 # LTR-F216A light sensor configuration options
7 bool "LiteOn LTR-F216A Light Sensor"
12 Enable driver for LiteOn LTR-F216A light sensors.
/Zephyr-latest/drivers/sensor/vishay/vcnl4040/
DKconfig1 # VCNL4040 Proximity and Ambient Light Sensor configuration options
7 bool "VCNL4040 Proximity and Ambient Light Sensor"
17 bool "Ambient light sensor"
19 Enable Ambient Light Sense (ALS).
/Zephyr-latest/samples/sensor/grove_light/
DREADME.rst2 :name: Grove Light Sensor
5 Get illuminance data from a Grove Light Sensor.
10 This sample application gets the output of the grove light sensor and prints it to the console, in
19 * `Grove Light Sensor`_
51 .. _Grove Light Sensor: https://wiki.seeedstudio.com/Grove-Light_Sensor/
/Zephyr-latest/samples/sensor/max44009/
Dsample.yaml2 name: MAX44009 light sensor
4 This is a sample app to read an external MAX44009 light sensor via I2C
15 - "MAX44009 light sensor application"
/Zephyr-latest/samples/boards/microchip/mec15xxevb_assy6853/power_management/src/
Dpower_mgmt.h11 /** @brief Alternates between light and deep sleep cycles.
13 * For light sleep, the test sleeps in main thread for 500 ms longer than
26 /** @brief Alternates between light and deep sleep cycles.
28 * Performs same approach to achieve light and deep sleep, but additional
/Zephyr-latest/samples/sensor/vcnl4040/
DREADME.rst2 :name: VCNL4040 Proximity and Ambient Light Sensor
5 Get proximity and ambient light data from a VCNL4040 sensor (polling & trigger mode).
10 This sample periodically measures proximity and light for
45 Light (lux): 288
/Zephyr-latest/samples/boards/microchip/mec15xxevb_assy6853/power_management/
DREADME.rst10 It showcase simple app that allows to enter into light and deep sleep.
24 Wake from Light Sleep
27 Wake from Light Sleep
/Zephyr-latest/dts/bindings/sensor/
Dams,tsl2540.yaml5 TSL2540 series ambient light sensor. See datasheet at
22 Visible light attenuation.
31 Infa-red light attenuation.

1234567