Subversion Repositories Code-Repo

Rev

Rev 282 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef NEOPIXEL_H
#define NEOPIXEL_H

#define NEOPIXEL_LENGTH 60

#define NEOPIXEL_LOGIC_1 0b00000110
#define NEOPIXEL_LOGIC_0 0b00000011

// Color Definitions (base of 16 levels)
#define CLEAR   0x00,0x00,0x00
#define RED     0x10,0x00,0x00
#define ORANGE  0x08,0x02,0x00
#define YELLOW  0x08,0x08,0x00
#define GREEN   0x00,0x10,0x00
#define TEAL    0x00,0x08,0x04
#define BLUE    0x00,0x00,0x10
#define PURPLE  0x08,0x00,0x08
#define WHITE   0x08,0x08,0x08

typedef struct {
    uint8_t values[NEOPIXEL_LENGTH * 3];
    uint8_t offset;
} NEOPIXEL_DATA;

void NeoPixel_Init(void);
void NeoPixel_Offet(uint8_t value);
void NeoPixel_Clear(void);
void NeoPixel_Set(uint8_t index, uint8_t R, uint8_t G, uint8_t B, uint8_t multiplier);
void NeoPixel_Or(uint8_t index, uint8_t R, uint8_t G, uint8_t B, uint8_t multiplier);
void NeoPixel_Write_All(void);
void NeoPixel_Write_One(uint8_t value);

#endif  /* NEOPIXEL_H */