Open Lighting Architecture
0.10.9
Loading...
Searching...
No Matches
plugins
usbdmx
SunliteFirmwareLoader.h
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 2 of the License, or
5
* (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU Library General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15
*
16
* SunliteFirmwareLoader.h
17
* Load the firmware onto a USBDMX2 device
18
* Copyright (C) 2010 Simon Newton
19
*
20
* The Soundlite USBDMX2 interfaces require firmware to be loaded when they're
21
* connected, this performs that job.
22
*/
23
24
#ifndef PLUGINS_USBDMX_SUNLITEFIRMWARELOADER_H_
25
#define PLUGINS_USBDMX_SUNLITEFIRMWARELOADER_H_
26
27
#include <libusb.h>
28
#include "
ola/base/Macro.h
"
29
#include "plugins/usbdmx/FirmwareLoader.h"
30
31
namespace
ola
{
32
namespace
plugin {
33
namespace
usbdmx {
34
35
class
SunliteFirmwareLoader
:
public
FirmwareLoader
{
36
public
:
37
explicit
SunliteFirmwareLoader
(libusb_device *usb_device)
38
: m_device(usb_device) {}
39
~SunliteFirmwareLoader
() {}
40
41
bool
LoadFirmware();
42
43
private
:
44
libusb_device *m_device;
45
46
static
const
int
INTERFACE_NUMBER = 0;
// the device only has 1 interface
47
static
const
uint8_t UPLOAD_REQUEST_TYPE = 0x40;
48
static
const
uint8_t UPLOAD_REQUEST = 0xa0;
49
static
const
unsigned
int
UPLOAD_TIMEOUT = 300;
// ms
50
51
SunliteFirmwareLoader
(
const
SunliteFirmwareLoader
&) =
delete
;
52
const
SunliteFirmwareLoader
&operator=(
const
SunliteFirmwareLoader
&) =
delete
;
53
};
54
}
// namespace usbdmx
55
}
// namespace plugin
56
}
// namespace ola
57
#endif
// PLUGINS_USBDMX_SUNLITEFIRMWARELOADER_H_
Macro.h
Helper macros.
ola::plugin::usbdmx::FirmwareLoader
Definition
FirmwareLoader.h:28
ola::plugin::usbdmx::SunliteFirmwareLoader
Definition
SunliteFirmwareLoader.h:35
ola
The namespace containing all OLA symbols.
Definition
Credentials.cpp:44
Generated on Sat Aug 24 2024 09:00:45 for Open Lighting Architecture by
1.12.0