Skip to content

Commit

Permalink
Add arg to set probe interface # for xppen pro init
Browse files Browse the repository at this point in the history
  • Loading branch information
Mel committed Aug 22, 2021
1 parent 0edf31f commit 2e0e9cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hid-uclogic-params.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
* @params: Parameters to fill in (to be cleaned with
* uclogic_params_cleanup()). Not modified in case of error.
* Cannot be NULL.
* @interface: The device interface the control packet is sent to.
* @init_packet: Magic packet to send on usb to activate device.
* @packet_size: Size of the init packet.
* @rdesc_pen_arr: Pen report descriptor array.
Expand All @@ -1018,7 +1019,7 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
* Zero, if successful. A negative errno code on error.
*/
static int uclogic_params_init_ugee_xppen_pro(struct hid_device *hdev,
struct uclogic_params *p,
struct uclogic_params *p, const uint8_t interface,
const u8 init_packet[], const size_t packet_size,
const u8 rdesc_pen_arr[], const size_t rdesc_pen_size,
const u8 rdesc_frame_arr[], const size_t rdesc_frame_size)
Expand All @@ -1035,7 +1036,7 @@ static int uclogic_params_init_ugee_xppen_pro(struct hid_device *hdev,

rc = usb_interrupt_msg(
udev,
usb_sndintpipe(udev, 0x03),
usb_sndintpipe(udev, interface),
buf,
packet_size,
&actual_len,
Expand Down Expand Up @@ -1435,7 +1436,7 @@ int uclogic_params_init(struct uclogic_params *params,
break;
}

rc = uclogic_params_init_ugee_xppen_pro(hdev, &p, init_packet, packet_size,
rc = uclogic_params_init_ugee_xppen_pro(hdev, &p, 0x03, init_packet, packet_size,
uclogic_rdesc_xppen_a156p_pen_arr,
uclogic_rdesc_xppen_a156p_pen_size,
uclogic_rdesc_xppen_a156p_frame_arr,
Expand Down

0 comments on commit 2e0e9cc

Please sign in to comment.