NestGen2.Backlight (nest_gen2 v0.6.6)

Copy Markdown View Source

The LM3530 backlight.

set/1 sets the level used while the screen is awake (0..120; the stock UI uses 113). NestGen2.Power switches it off while asleep. The SDK re-writes the current value every second, because the panel goes dark about a minute after the last write.

Summary

Functions

Returns a specification to start this module under a supervisor.

Level used while the screen is awake, 0..120.

Hardware fade times. Each is rounded to the nearest the chip supports: 1, 130, 260, 520, 1000, 2000, 4000 or 8000 ms. Stock: 260 up, 2000 down.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

level()

@spec level() :: 0..120

set(level)

@spec set(0..120) :: :ok

Level used while the screen is awake, 0..120.

set_fade(rise_ms, fall_ms)

@spec set_fade(pos_integer(), pos_integer()) :: :ok

Hardware fade times. Each is rounded to the nearest the chip supports: 1, 130, 260, 520, 1000, 2000, 4000 or 8000 ms. Stock: 260 up, 2000 down.

start_link(_)