]> git.sesse.net Git - vlc/blob - modules/video_filter/atmo/AtmoSerialConnection.h
Qt: more details on the icon view.
[vlc] / modules / video_filter / atmo / AtmoSerialConnection.h
1 /*
2  * AtmoCom.h: Class for communication with the serial hardware of Atmo Light,
3  * opens and configures the serial port
4  *
5  * See the README.txt file for copyright information and how to reach the author(s).
6  *
7  * $Id$
8  */
9 #ifndef _AtmoSerialConnection_h_
10 #define _AtmoSerialConnection_h_
11
12 #include "AtmoDefs.h"
13 #include "AtmoConnection.h"
14 #include "AtmoConfig.h"
15
16 #if defined(WIN32)
17 #   include <windows.h>
18 #endif
19
20
21 class CAtmoSerialConnection : public CAtmoConnection {
22     private:
23         HANDLE m_hComport;
24
25 #if defined(WIN32)
26         DWORD  m_dwLastWin32Error;
27     public:
28         DWORD getLastError() { return m_dwLastWin32Error; }
29 #endif
30
31     public:
32        CAtmoSerialConnection(CAtmoConfig *cfg);
33        virtual ~CAtmoSerialConnection(void);
34
35            virtual ATMO_BOOL OpenConnection();
36
37        virtual void CloseConnection();
38
39        virtual ATMO_BOOL isOpen(void);
40
41        virtual ATMO_BOOL SendData(unsigned char numChannels,
42                                   int red[],
43                                   int green[],
44                                   int blue[]);
45
46        virtual ATMO_BOOL SendData(tColorPacket data);
47
48        virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
49                                              int global_contrast,
50                                              int contrast_red,
51                                              int contrast_green,
52                                              int contrast_blue,
53                                              int gamma_red,
54                                              int gamma_green,
55                                              int gamma_blue,
56                                              ATMO_BOOL storeToEeprom);
57 };
58
59 #endif