Written by Ayrton Leyssens DMX library, bitbang method for LPC1768

Dependents:   ArtnetDMX

Committer:
Ayrton_L
Date:
Thu Mar 17 00:08:32 2016 +0000
Revision:
4:54754f9736f1
Parent:
1:4eb21fcb621a
Child:
6:622a294f70ab
Removed TimeOut

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 1:4eb21fcb621a 15
Ayrton_L 0:55edcc97ba17 16 void V_SendDMX();
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 1:4eb21fcb621a 26
Ayrton_L 0:55edcc97ba17 27 uint8_t I8_m_Data[512];
Ayrton_L 1:4eb21fcb621a 28
Ayrton_L 0:55edcc97ba17 29 void V_SendMAB();
Ayrton_L 0:55edcc97ba17 30 void V_SendSC();
Ayrton_L 0:55edcc97ba17 31 void V_SendData();
Ayrton_L 0:55edcc97ba17 32 };
Ayrton_L 0:55edcc97ba17 33 #endif