Keyframe to blink between two colors.
More...
Keyframe to blink between two colors.
◆ DUTY_CYCLE_DEFAULT
| #define DUTY_CYCLE_DEFAULT (50U) |
Default duty cycle if not specified.
◆ keyframe_blink_ctor()
Initialize a Blink keyframe with the appropriate keyframe_base_t and state values.
- Parameters
-
| [in] | p_blink | Pointer to the blink keyframe to construct, or NULL to allocate a new one. |
- Returns
- Pointer to the keyframe base portion of the blink keyframe.
◆ keyframe_blink_parse()
| keyframe_base_t * keyframe_blink_parse |
( |
char * |
p_str | ) |
|
Parses a command string into a Blink Keyframe.
- Parameters
-
| [in] | p_str | Pointer to the command string. |
- Returns
- Pointer to the parsed keyframe or NULL on error.
◆ keyframe_blink_render_frame()
| static bool keyframe_blink_render_frame |
( |
keyframe_base_t *const |
p_keyframe, |
|
|
timestep_t |
time, |
|
|
color_rgb_t * |
p_color_out |
|
) |
| |
|
static |
◆ keyframe_blink_render_init()
| static void keyframe_blink_render_init |
( |
keyframe_base_t *const |
p_keyframe, |
|
|
framerate_t |
framerate, |
|
|
color_rgb_t |
current_color |
|
) |
| |
|
static |
◆ keyframe_blink_api
Initial value:=
{
.clone = keyframe_blink_clone,
}
static void keyframe_blink_render_init(keyframe_base_t *const p_keyframe, framerate_t framerate, color_rgb_t current_color)
Definition: keyframe_blink.c:78
static bool keyframe_blink_render_frame(keyframe_base_t *const p_keyframe, timestep_t time, color_rgb_t *p_color_out)
Definition: keyframe_blink.c:57
Blink keyframe API function pointers.
◆ keyframe_blink_init
Initial value:=
{
.base =
{
.modifiers = { .repeat_count = -1 }
},
.args =
{
.color2_provided = false,
.color1_provided = false,
.duty_cycle = 50,
.period = 1,
}
}
static const keyframe_base_api_t keyframe_blink_api
Definition: keyframe_blink.c:25
Default values for blink keyframe structs.