Rev 2 | Rev 6 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /* |
2 | * leds.h |
||
3 | * |
||
4 | * Created on: 7 Jul 2019 |
||
5 | * Author: Mike |
||
6 | */ |
||
7 | |||
8 | #pragma once |
||
9 | |||
10 | #define SPI_PRESCALE 8 |
||
11 | |||
12 | extern void sendLeds(void); |
||
13 | |||
14 | |||
15 | typedef enum |
||
16 | { |
||
17 | DMX_IDLE, // nothing happening |
||
18 | DMX_BREAK, // |
||
19 | DMX_BYTES, |
||
5 | mjames | 20 | DMX_DATA, // got data |
21 | DMX_DONE // finished with DMX data |
||
2 | mjames | 22 | |
23 | } DMX_State_t; |
||
24 | |||
5 | mjames | 25 | |
2 | mjames | 26 | extern DMX_State_t DMX_State; |
27 | |||
5 | mjames | 28 | extern uint8_t DMX_Buffer[512]; |
29 | extern uint32_t DMX_Pointer; |
||
30 | |||
31 | |||
32 | #pragma pack(push,1) |
||
2 | mjames | 33 | typedef struct |
34 | { |
||
35 | uint8_t fader; |
||
36 | uint8_t red; |
||
37 | uint8_t green; |
||
38 | uint8_t blue; |
||
5 | mjames | 39 | uint8_t white; |
40 | } frgbw_t; |
||
41 | #pragma pack(pop) |