Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
280 Kevin 1
#ifndef NEOPIXEL_H
2
#define	NEOPIXEL_H
3
 
4
#define NEOPIXEL_LENGTH 60
5
 
6
#define NEOPIXEL_LOGIC_1 0b00000110
7
#define NEOPIXEL_LOGIC_0 0b00000011
8
 
9
// Color Definitions
10
#define CLEAR   0x00,0x00,0x00
11
#define RED     0xFF,0x00,0x00
12
#define ORANGE  0x8F,0x20,0x00
13
#define YELLOW  0x8F,0x8F,0x00
14
#define GREEN   0x00,0xFF,0x00
15
#define TEAL    0x00,0x8F,0x40
16
#define BLUE    0x00,0x00,0xFF
17
#define PURPLE  0x8F,0x00,0x8F
18
#define WHITE   0x6F,0x6F,0x6F
19
 
20
typedef struct {
281 Kevin 21
    uint8_t values[NEOPIXEL_LENGTH * 3];
22
    uint8_t offset;
280 Kevin 23
} NEOPIXEL_DATA;
24
 
281 Kevin 25
void NeoPixel_Init(void);
26
void NeoPixel_Offet(uint8_t value);
27
void NeoPixel_Clear(void);
28
void NeoPixel_Set(uint8_t index, uint8_t R, uint8_t G, uint8_t B);
29
void NeoPixel_Or(uint8_t index, uint8_t R, uint8_t G, uint8_t B);
280 Kevin 30
void NeoPixel_Write_All(void);
281 Kevin 31
void NeoPixel_Write_One(uint8_t value);
280 Kevin 32
 
33
#endif	/* NEOPIXEL_H */
34