summaryrefslogtreecommitdiff
path: root/vfd.h
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2011-05-22 19:08:46 +0200
committeranbr <vdr07@deltab.de>2011-05-22 19:08:46 +0200
commitacbdb1ddc238e7c0a942043b3d0d1d81bb701edd (patch)
treeaed8d1a4147bacf56cae5835dd876aff096f51c2 /vfd.h
parentd5a0dbd37d69eb3eb64b86c31ca834f88ab68f60 (diff)
downloadvdr-plugin-targavfd-acbdb1ddc238e7c0a942043b3d0d1d81bb701edd.tar.gz
vdr-plugin-targavfd-acbdb1ddc238e7c0a942043b3d0d1d81bb701edd.tar.bz2
Drop dependency to libhid, now is libusb-1.0 used0.1.0
Diffstat (limited to 'vfd.h')
-rw-r--r--vfd.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/vfd.h b/vfd.h
index a8ce8e7..ca079b9 100644
--- a/vfd.h
+++ b/vfd.h
@@ -1,7 +1,7 @@
/*
* targavfd plugin for VDR (C++)
*
- * (C) 2010 Andreas Brachold <vdr07 AT deltab de>
+ * (C) 2010-2011 Andreas Brachold <vdr07 AT deltab de>
*
* This targavfd plugin is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -15,7 +15,7 @@
#define __VFD_H_
#include <queue>
-#include <hid.h>
+#include <libusb-1.0/libusb.h>
#include "bitmap.h"
enum eIcons {
@@ -49,21 +49,20 @@ enum eIcons {
class cVFDFont;
-class cVFDQueue : public std::queue<byte> {
- HIDInterface* hid;
- bool bInit;
+class cVFDQueue : public std::queue<unsigned char> {
+ struct libusb_device_handle* devh;
public:
cVFDQueue();
virtual ~cVFDQueue();
protected:
virtual bool open();
virtual void close();
- virtual bool isopen() const { return hid != 0; }
- void QueueCmd(const byte & cmd);
- void QueueData(const byte & data);
+ virtual bool isopen() const { return devh != NULL; }
+ void QueueCmd(const unsigned char & cmd);
+ void QueueData(const unsigned char & data);
bool QueueFlush();
private:
- const char *hiderror(hid_return ret) const;
+ const char *usberror(int ret) const;
};
class cVFD : public cVFDQueue {