shuttleVFD: Add support for devices with USB VID 0x1308 again. This was lost

when support for newer devices was added.
This commit is contained in:
mmdolze
2010-02-04 22:02:37 +00:00
parent b2348d5b53
commit 948035d860
3 changed files with 12 additions and 9 deletions
+1
View File
@@ -23,6 +23,7 @@ v.0.5dev (ongoing development)
* server core: New network input buffering
* hd44780: Extended subdriver API and performance improvement for lcd2usb
* hd44780: Add KOI8-R character mapping (Yura Scheglyuk)
* shuttleVFD: Add support for devices with USB VID 0x1308 again
v0.5.3
+ lcdexec: notification when called program finishes
+9 -8
View File
@@ -4,17 +4,17 @@
/*
* Copyright (C) 2007 Thien Vu
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -139,7 +139,8 @@ MODULE_EXPORT int shuttleVFD_init(Driver *drvthis)
for (bus = usb_get_busses(); bus != NULL; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev != NULL; dev = dev->next) {
if (dev->descriptor.idVendor == SHUTTLE_VFD_VENDOR_ID &&
if ((dev->descriptor.idVendor == SHUTTLE_VFD_VENDOR_ID1 ||
dev->descriptor.idVendor == SHUTTLE_VFD_VENDOR_ID2) &&
(dev->descriptor.idProduct == SHUTTLE_VFD_PRODUCT_ID1 ||
dev->descriptor.idProduct == SHUTTLE_VFD_PRODUCT_ID2)) {
p->dev = usb_open(dev);
@@ -154,7 +155,7 @@ MODULE_EXPORT int shuttleVFD_init(Driver *drvthis)
if (claim_rc < 0) {
report(RPT_ERR,
"%s: unable to claim interface: %s",
drvthis->name, strerror(claim_rc));
drvthis->name, strerror(claim_rc));
return -1;
}
@@ -274,19 +275,19 @@ MODULE_EXPORT void shuttleVFD_flush(Driver *drvthis)
packet[0] = 0x11;
packet[1] = 0x02;
send_packet(drvthis, packet);
// write framebuf[0-6]
memset(packet, '\0', SHUTTLE_VFD_PACKET_SIZE);
packet[0] = 0x97;
strncpy(&packet[1], &p->framebuf[0], 7);
send_packet(drvthis, packet);
// write framebuf[7-13]
memset(packet, '\0', SHUTTLE_VFD_PACKET_SIZE);
packet[0] = 0x97;
strncpy(&packet[1], &p->framebuf[7], 7);
send_packet(drvthis, packet);
// write framebuf[14-20]
memset(packet, '\0', SHUTTLE_VFD_PACKET_SIZE);
packet[0] = 0x96;
+2 -1
View File
@@ -56,7 +56,8 @@ MODULE_EXPORT int shuttleVFD_cellheight(Driver *drvthis);
#define SHUTTLE_VFD_CELLHEIGHT 8
// VFD USB properties
#define SHUTTLE_VFD_VENDOR_ID 0x051c
#define SHUTTLE_VFD_VENDOR_ID1 0x1308
#define SHUTTLE_VFD_VENDOR_ID2 0x051c
#define SHUTTLE_VFD_PRODUCT_ID1 0x0003
// IR-receiver included in this model
#define SHUTTLE_VFD_PRODUCT_ID2 0x0005