Written by Ayrton Leyssens DMX library, bitbang method for LPC1768

Dependents:   ArtnetDMX

Committer:
Ayrton_L
Date:
Wed Mar 09 03:58:29 2016 +0000
Revision:
0:55edcc97ba17
Child:
1:4eb21fcb621a
DMX LIbrary LPC1768 BitBang Method

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Ayrton_L 0:55edcc97ba17 1 #ifndef DMX_H
Ayrton_L 0:55edcc97ba17 2 #define DMX_H
Ayrton_L 0:55edcc97ba17 3 #include "mbed.h"
Ayrton_L 0:55edcc97ba17 4 class DMX
Ayrton_L 0:55edcc97ba17 5 {
Ayrton_L 0:55edcc97ba17 6 public:
Ayrton_L 0:55edcc97ba17 7 DMX(PinName pin);
Ayrton_L 0:55edcc97ba17 8 ~DMX();
Ayrton_L 0:55edcc97ba17 9
Ayrton_L 0:55edcc97ba17 10 void V_SetBreak(uint32_t I32_BreakTime);
Ayrton_L 0:55edcc97ba17 11 void V_SetMAB(uint32_t I32_MABTime);
Ayrton_L 0:55edcc97ba17 12 void V_SetSC(uint32_t I32_StartCodeTime);
Ayrton_L 0:55edcc97ba17 13 void V_SetBitTime(uint32_t I32_BitTime);
Ayrton_L 0:55edcc97ba17 14 void V_SetData(uint8_t I8_Data[512]);
Ayrton_L 0:55edcc97ba17 15 void V_SendDMX();
Ayrton_L 0:55edcc97ba17 16
Ayrton_L 0:55edcc97ba17 17
Ayrton_L 0:55edcc97ba17 18 private:
Ayrton_L 0:55edcc97ba17 19 DigitalOut _pin;
Ayrton_L 0:55edcc97ba17 20 uint32_t I32_m_BreakTime;
Ayrton_L 0:55edcc97ba17 21 uint32_t I32_m_MABTime;
Ayrton_L 0:55edcc97ba17 22 uint32_t I32_m_StartCodeTime;
Ayrton_L 0:55edcc97ba17 23 uint32_t I32_m_BitTime;
Ayrton_L 0:55edcc97ba17 24 uint32_t I32_m_ChannelCounter;
Ayrton_L 0:55edcc97ba17 25 uint32_t I32_m_BitCounter;
Ayrton_L 0:55edcc97ba17 26 uint8_t I8_m_Data[512];
Ayrton_L 0:55edcc97ba17 27 void V_SendMAB();
Ayrton_L 0:55edcc97ba17 28 void V_SendSC();
Ayrton_L 0:55edcc97ba17 29 void V_SendData();
Ayrton_L 0:55edcc97ba17 30 Timeout t;
Ayrton_L 0:55edcc97ba17 31 };
Ayrton_L 0:55edcc97ba17 32 #endif