-
Notifications
You must be signed in to change notification settings - Fork 2
/
DMX.h
51 lines (41 loc) · 965 Bytes
/
DMX.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* File: DMX.h
* Author: sarahemm
*
* Created on March 15, 2013, 9:55 PM
*/
#include <Board.h>
#ifndef DMX_H
#define DMX_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HW_REV001
#define DMX_RXDIS_PORT IOPORT_B
#define DMX_RXDIS_PIN BIT_3
#define DMX_TXEN_PORT IOPORT_B
#define DMX_TXEN_PIN BIT_4
#define DMX_UART UART1
#define DMX_UART_STABITS U1STAbits
#endif
#ifdef HW_REV002
#define DMX_RXDIS_PORT IOPORT_G
#define DMX_RXDIS_PIN BIT_9
#define DMX_TXEN_PORT IOPORT_G
#define DMX_TXEN_PIN BIT_6
#define DMX_UART UART3
#define DMX_UART_STABITS U3STAbits
#define DMX_UART_TX_PORT IOPORT_G
#define DMX_UART_TX_PIN BIT_8
#endif
extern short dmx_channel;
extern BYTE dmx_break_rx;
void DMXPortInit(void);
void DMXSendInit(void);
void DMXReceiveInit(void);
void DMXSendTask(void);
void __attribute__((nomips16)) DMXReceiveISR(void);
#ifdef __cplusplus
}
#endif
#endif /* DMX_H */