mirror of https://github.com/nirenjan/libx52.git
Revert "Save PID in libx52_device structure"
This reverts commit f963991161.
The updated design uses hidapi to create a separate connection to the
X52 device, and libx52 is limited to only dealing with the vendor
specific commands.
pull/26/head
parent
f963991161
commit
1cbad472df
|
|
@ -14,11 +14,6 @@
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
#include "libx52.h"
|
#include "libx52.h"
|
||||||
|
|
||||||
#define VENDOR_SAITEK 0x06a3
|
|
||||||
#define X52_PROD_X52PRO 0x0762
|
|
||||||
#define X52_PROD_X52_1 0x0255
|
|
||||||
#define X52_PROD_X52_2 0x075C
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The X52 MFD supports the following:
|
* The X52 MFD supports the following:
|
||||||
* - 3 lines of 16 characters each
|
* - 3 lines of 16 characters each
|
||||||
|
|
@ -38,7 +33,6 @@ struct x52_mfd_line {
|
||||||
struct libx52_device {
|
struct libx52_device {
|
||||||
libusb_context *ctx;
|
libusb_context *ctx;
|
||||||
libusb_device_handle *hdl;
|
libusb_device_handle *hdl;
|
||||||
uint16_t pid;
|
|
||||||
|
|
||||||
uint32_t update_mask;
|
uint32_t update_mask;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
#include "x52_common.h"
|
#include "x52_common.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
|
#define VENDOR_SAITEK 0x06a3
|
||||||
|
#define X52_PROD_X52PRO 0x0762
|
||||||
|
#define X52_PROD_X52_1 0x0255
|
||||||
|
#define X52_PROD_X52_2 0x075C
|
||||||
|
|
||||||
/* Check if the USB device is supported by this library */
|
/* Check if the USB device is supported by this library */
|
||||||
static int libx52_check_product(uint16_t idVendor, uint16_t idProduct)
|
static int libx52_check_product(uint16_t idVendor, uint16_t idProduct)
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +101,6 @@ int libx52_connect(libx52_device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->hdl = hdl;
|
dev->hdl = hdl;
|
||||||
dev->pid = desc.idProduct;
|
|
||||||
|
|
||||||
if (libx52_device_is_x52pro(desc.idProduct)) {
|
if (libx52_device_is_x52pro(desc.idProduct)) {
|
||||||
set_bit(&(dev->flags), X52_FLAG_IS_PRO);
|
set_bit(&(dev->flags), X52_FLAG_IS_PRO);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue