Subversion Repositories LedShow

Rev

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

Rev 6 Rev 8
Line 7... Line 7...
7
 
7
 
8
#pragma once
8
#pragma once
9
 
9
 
10
#define SPI_PRESCALE 8
10
#define SPI_PRESCALE 8
11
 
11
 
12
extern void sendLeds(void);
-
 
13
 
-
 
14
#pragma pack(push,1)
12
#pragma pack(push,1)
15
typedef struct
13
typedef struct
16
{
14
{
17
        uint8_t fader;
15
        uint8_t fader; // set to 0..255 to fade chosen RGBW colour from 0..100% intensity
18
        uint8_t red;
16
        uint8_t red;   // set to 0..255 to fade red component
19
        uint8_t green;
17
        uint8_t green; // set to 0..255 to fade green component
20
        uint8_t blue;
18
        uint8_t blue;  // set to 0..255 to fade blue component
21
        uint8_t white;
19
        uint8_t white; // set to 0..255 to fade white led component
22
} frgbw_t;
20
} frgbw_t;
23
#pragma pack(pop)
21
#pragma pack(pop)
-
 
22
 
-
 
23
// Usage initCode(), codeReset(); for (i=0; i< leds; i++ ) ( codeFRGBW(leds[i]) } codeStop();
-
 
24
extern void initCode( void); ///< Call this first to initialise coder pointer
-
 
25
 
-
 
26
extern void     codeReset(void); ///< Call this to send a reset code to LEDS
-
 
27
 
-
 
28
extern void codeFRGBW(frgbw_t led ); ///< code the RGBW descriptor into the next LED.
-
 
29
 
-
 
30
extern void codeStop (void); ///< Call this to send a dark LED stop pattern
-
 
31
 
-
 
32
extern void sendCode (void); ///< call this to send data via SPI DMA to LEDS.
-
 
33