Subversion Repositories Code-Repo

Rev

Rev 281 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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