2 * FnordlichtConnection.h: class to access a FnordlichtLight Hardware
3 * - the description could be found
4 * here: http://github.com/fd0/fnordlicht/raw/master/doc/PROTOCOL
6 * (C) Kai Lauterbach (klaute at gmail.com)
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef _FnordlichtConnection_h_
25 #define _FnordlichtConnection_h_
28 #include "AtmoConnection.h"
29 #include "AtmoConfig.h"
36 class CFnordlichtConnection : public CAtmoConnection
42 ATMO_BOOL stop(unsigned char addr);
43 ATMO_BOOL reset(unsigned char addr);
44 ATMO_BOOL start_bootloader(unsigned char addr);
45 ATMO_BOOL boot_enter_application(unsigned char addr);
48 DWORD m_dwLastWin32Error;
50 DWORD getLastError() { return m_dwLastWin32Error; }
54 CFnordlichtConnection (CAtmoConfig *cfg);
55 virtual ~CFnordlichtConnection (void);
57 virtual ATMO_BOOL OpenConnection();
59 virtual void CloseConnection();
61 virtual ATMO_BOOL isOpen(void);
63 virtual ATMO_BOOL SendData(pColorPacket data);
65 virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
73 ATMO_BOOL storeToEeprom);
75 virtual int getAmountFnordlichter();
77 virtual const char *getDevicePath() { return "fnordlicht"; }
79 #if !defined(_ATMO_VLC_PLUGIN_)
80 virtual char *getChannelName(int ch);
81 virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent,
85 virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca);