PixelKey
NeoPixel USB Key
Loading...
Searching...
No Matches
Keyframes

Modules

 Fade Keyframe
 Keyframe for transitioning between two or more colors.
 
 
 Set Keyframe
 Keyframe to set a NeoPixel to a constant color.
 

Data Structures

struct  keyframe_base_api_t
 Base API for all keyframe types. More...
 
struct  keyframe_schedule_t
 Provides scheduled time information for keyframes. More...
 
struct  keyframe_base_t
 Base struct for all keyframe types, must be the first element in child structs. More...
 
struct  keyframe_group_t
 Storage and state for keyframe groups. More...
 

Macros

#define FRAMERATE_MIN   (1U)
 Minimum supported frame rate, frames per second.
 
#define FRAMERATE_MAX   (128U)
 Maximum supported frame rate, frames per second. More...
 
#define TIMESTEP_FINISHED   ((timestep_t) 0U)
 No more timesteps are required.
 
#define TIMESTEP_INDEFINITE   ((timestep_t) UINT32_MAX)
 Indefinite time remaining.
 
#define GROUP_CHILDREN_MAX_COUNT   (16)
 Maximum allowed child keyframes.
 

Typedefs

typedef uint32_t timestep_t
 The base unit of time for animating keyframes; resolution of 1 frame.
 
typedef uint8_t framerate_t
 Number of frames per second.
 

Enumerations

enum  schedule_type_t { SCHEDULE_TYPE_NONE , SCHEDULE_TYPE_FIXED , SCHEDULE_TYPE_RELATIVE , SCHEDULE_TYPE_INTERVAL }
 Types of supported keyframe schedules. More...
 
enum  keyframe_flag_t { KEYFRAME_FLAG_NONE = 0UL , KEYFRAME_FLAG_INITIALIZED = (1UL << 30) , KEYFRAME_FLAG_GROUP = (1UL << 31) }
 Management flags for keyframes. More...
 

Functions

keyframe_base_t * keyframe_blink_parse (char *p_str)
 Parses a command string into a Blink Keyframe. More...
 
keyframe_base_t * keyframe_blink_ctor (keyframe_blink_t *p_blink)
 Initialize a Blink keyframe with the appropriate keyframe_base_t and state values. More...
 
keyframe_base_t * keyframe_fade_parse (char *p_str)
 Parses a command string into a Fade Keyframe. More...
 
keyframe_base_t * keyframe_fade_ctor (keyframe_fade_t *p_fade)
 Initialize a Fade keyframe with the appropriate keyframe_base_t and state values. More...
 
keyframe_base_t * keyframe_set_parse (char *p_str)
 Parses a command string into a Set Keyframe. More...
 
keyframe_base_t * keyframe_set_ctor (keyframe_set_t *p_set)
 Initialize a Set keyframe with the appropriate keyframe_base_t values. More...
 

Detailed Description

Macro Definition Documentation

◆ FRAMERATE_MAX

#define FRAMERATE_MAX   (128U)

Maximum supported frame rate, frames per second.

This is based on the resolutions for the RTC peripheral.

Enumeration Type Documentation

◆ keyframe_flag_t

Management flags for keyframes.

Enumerator
KEYFRAME_FLAG_NONE 

No flags are set.

KEYFRAME_FLAG_INITIALIZED 

The keyframe has been initialized.

KEYFRAME_FLAG_GROUP 

The keyframe is a group keyframe.

◆ schedule_type_t

Types of supported keyframe schedules.

Enumerator
SCHEDULE_TYPE_NONE 

No schedule.

SCHEDULE_TYPE_FIXED 

Schedule is fixed at a specific time.

SCHEDULE_TYPE_RELATIVE 

Schedule is for a relative time in the future.

SCHEDULE_TYPE_INTERVAL 

Schedule is for a variable interval of a start and end time.

Function Documentation

◆ keyframe_blink_ctor()

keyframe_base_t * keyframe_blink_ctor ( keyframe_blink_t p_blink)

Initialize a Blink keyframe with the appropriate keyframe_base_t and state values.

Parameters
[in]p_blinkPointer 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_strPointer to the command string.
Returns
Pointer to the parsed keyframe or NULL on error.

◆ keyframe_fade_ctor()

keyframe_base_t * keyframe_fade_ctor ( keyframe_fade_t p_fade)

Initialize a Fade keyframe with the appropriate keyframe_base_t and state values.

Parameters
[in]p_fadePointer to the fade keyframe to construct, or NULL to allocate a new one.
Returns
Pointer to the keyframe base portion of the fade keyframe.

◆ keyframe_fade_parse()

keyframe_base_t * keyframe_fade_parse ( char *  p_str)

Parses a command string into a Fade Keyframe.

Parameters
[in]p_strPointer to the command string.
Returns
Pointer to the parsed keyframe or NULL on error.

◆ keyframe_set_ctor()

keyframe_base_t * keyframe_set_ctor ( keyframe_set_t p_set)

Initialize a Set keyframe with the appropriate keyframe_base_t values.

Parameters
[in]p_setPointer to the set keyframe to construct, or NULL to allocate a new one.
Returns
Pointer to the keyframe base portion of the set keyframe.

◆ keyframe_set_parse()

keyframe_base_t * keyframe_set_parse ( char *  p_str)

Parses a command string into a Set Keyframe.

Parameters
[in]p_strPointer to the command string.
Returns
Pointer to the parsed keyframe or NULL on error.