27 lines
412 B
C
27 lines
412 B
C
#ifndef APP_H
|
|
#define APP_H
|
|
|
|
#include <sys/time.h>
|
|
#include "shader.h"
|
|
#include "spi_utils.h"
|
|
|
|
typedef struct AppContext {
|
|
int stop_flag;
|
|
|
|
int light_fd;
|
|
|
|
uint8_t* buffer;
|
|
Color* colors;
|
|
Status* status;
|
|
|
|
struct timeval start_time;
|
|
|
|
int num_leds;
|
|
int data_size;
|
|
} AppContext;
|
|
|
|
void init_app(AppContext* ctx);
|
|
void event_loop(AppContext* ctx);
|
|
void exit_app(AppContext* ctx);
|
|
|
|
#endif |