Imported Upstream version 2.7.1
This commit is contained in:
parent
a1fa151fc7
commit
0121794af9
451 changed files with 41339 additions and 10887 deletions
|
|
@ -28,7 +28,7 @@
|
|||
#include "blazer.h"
|
||||
|
||||
#define DRIVER_NAME "Megatec/Q1 protocol USB driver"
|
||||
#define DRIVER_VERSION "0.09"
|
||||
#define DRIVER_VERSION "0.10"
|
||||
|
||||
/* driver description structure */
|
||||
upsdrv_info_t upsdrv_info = {
|
||||
|
|
@ -40,6 +40,8 @@ upsdrv_info_t upsdrv_info = {
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
#ifndef TESTING
|
||||
|
||||
static usb_communication_subdriver_t *usb = &usb_subdriver;
|
||||
static usb_dev_handle *udev = NULL;
|
||||
static USBDevice_t usbdevice;
|
||||
|
|
@ -313,28 +315,28 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen)
|
|||
}
|
||||
|
||||
|
||||
static void *cypress_subdriver(void)
|
||||
static void *cypress_subdriver(USBDevice_t *device)
|
||||
{
|
||||
subdriver_command = &cypress_command;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void *ippon_subdriver(void)
|
||||
static void *ippon_subdriver(USBDevice_t *device)
|
||||
{
|
||||
subdriver_command = &ippon_command;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void *krauler_subdriver(void)
|
||||
static void *krauler_subdriver(USBDevice_t *device)
|
||||
{
|
||||
subdriver_command = &krauler_command;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void *phoenix_subdriver(void)
|
||||
static void *phoenix_subdriver(USBDevice_t *device)
|
||||
{
|
||||
subdriver_command = &phoenix_command;
|
||||
return NULL;
|
||||
|
|
@ -365,7 +367,7 @@ static int device_match_func(USBDevice_t *hd, void *privdata)
|
|||
return 1;
|
||||
}
|
||||
|
||||
switch (is_usb_device_supported(blazer_usb_id, hd->VendorID, hd->ProductID))
|
||||
switch (is_usb_device_supported(blazer_usb_id, hd))
|
||||
{
|
||||
case SUPPORTED:
|
||||
return 1;
|
||||
|
|
@ -384,6 +386,8 @@ static USBDeviceMatcher_t device_matcher = {
|
|||
NULL
|
||||
};
|
||||
|
||||
#endif /* TESTING */
|
||||
|
||||
|
||||
/*
|
||||
* Generic command processing function. Send a command and read a reply.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue