LED stripe – Code – Bresenham.h

/*
 * Bresenham.h
 *
 * Created: 19-02-17 11:55:05
 *  Author: raspi.th.in@gmail.com
 */ 


#ifndef BRESENHAM_H_
#define BRESENHAM_H_
#include "LED_define.h"



typedef enum
{
	R,
	G,
	B,
	LOOP_END,
	LOOP_FINISHED
}
Loop_type;

typedef struct
{
	LED_color Current;
	int i, l, m, n, R_inc, G_inc, B_inc, err_1, err_2, dR2, dG2, dB2;
	Loop_type loop;
	int delay;

}
tBresenham;

uint8_t Bresenham3D_next(tBresenham *mypoint);
tBresenham Bresenham3D_init(Color_gradient led_colors);

#endif /* BRESENHAM_H_ */