/*
 *
 */


#include <Arduino.h>
#include <stdint.h>



typedef struct LedProgState {
    uint8_t runena;
    uint8_t prog_idx;
    uint8_t prog_next;
    uint8_t prog_repeat;
    uint8_t prog_remain;
    uint8_t x, y, z;
    uint16_t speed;
    uint16_t speedtick;
    uint16_t ledidx;
    uint16_t flags;
    uint16_t pwait;
    uint16_t option[6];
    uint16_t rsvd;
} LedProgState;

typedef struct LedProgList {
    const char *name;
    void (*progfn)(LedProgState *);
} LedProgList;



extern const LedProgList ledprog_list[11];
extern LedProgState progu[6];
extern LedProgState *prog;



void ledprog_init(LedProgState *state);

void ledprog_save();
void ledprog_load(uint8_t force_default);