Ayrton Leyssens / DMX

Dependents:   ArtnetDMX

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DMX.h Source File

DMX.h

00001 #ifndef DMX_H
00002 #define DMX_H
00003 
00004 #include "mbed.h"
00005 
00006 enum DMX_STATUS {
00007     BEGIN,
00008     START,
00009     BREAK,
00010     MAB,
00011     DATA,
00012     STOP,
00013 };
00014 
00015 class DMX 
00016 {
00017     public:
00018         DMX (PinName p_tx, PinName p_rx); 
00019         void V_PutData(int addr, int data);
00020         
00021         void V_Start ();
00022         void V_Stop ();
00023     
00024     private:
00025         
00026         Serial _dmx;                                                //seriele poort / uart voor dmx gebruiken
00027         Timeout T_Timer;   
00028         LPC_UART_TypeDef *_uart;                                    //definitie om uart te kunnen gebruiken als cross fucntie gebruik
00029         
00030         void V_InitTimer();
00031         void V_InitSend ();
00032     
00033         volatile DMX_STATUS ZendStatus;
00034         volatile uint32_t I32_m_Addr;
00035         uint8_t I8_Data[512];
00036 };
00037 
00038 #endif