Subversion Repositories LedShow

Rev

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

Rev 6 Rev 7
Line 3... Line 3...
3
 *
3
 *
4
 *  Created on: 26 Jul 2019
4
 *  Created on: 26 Jul 2019
5
 *      Author: Mike
5
 *      Author: Mike
6
 */
6
 */
7
 
7
 
-
 
8
#include "stdint.h"
-
 
9
#include "string.h"
-
 
10
#include "dmx.h"
8
 
11
 
9
 
12
 
10
// DMX state variables
13
// DMX state variables
11
DMX_State_t DMX_State = DMX_IDLE;
14
DMX_State_t DMX_State = DMX_IDLE;
12
uint8_t DMX_Buffer[512];
15
uint8_t DMX_Buffer[512];
13
uint32_t DMX_Pointer;
16
uint32_t DMX_Pointer;
14
 
17
 
15
void dmx_state(uint8_t* Buf, uint32_t *Len)
18
void dmx_handle_state(uint8_t* Buf, uint32_t *Len)
16
{
19
{
17
switch (DMX_State)
20
switch (DMX_State)
18
{
21
{
19
case    DMX_IDLE:  // nothing happening
22
case    DMX_IDLE:  // nothing happening
20
          break;
23
          break;
Line 48... Line 51...
48
break;
51
break;
49
case DMX_DATA:
52
case DMX_DATA:
50
case DMX_DONE:
53
case DMX_DONE:
51
   break;
54
   break;
52
}
55
}
-
 
56
}
53
 
57