Skip to content

Commit cd703e3

Browse files
author
Filip Jagodzinski
committed
Tests: USBHID: Reuse VID & PID from basic test
To successfully use pyusb on Windows hosts, a Zadig configuration has to be performed. Since config for basic tests has already been provided, use it again.
1 parent 9d04a21 commit cd703e3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

TESTS/usb_device/hid/main.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
#include "USBMouse.h"
2929
#include "USBKeyboard.h"
3030

31-
#define USB_HID_VID 0x1234
32-
#define USB_HID_PID_GENERIC 0x0007
33-
#define USB_HID_PID_KEYBOARD 0x0008
34-
#define USB_HID_PID_MOUSE 0x0009
31+
// Reuse the VID & PID from basic USB test.
32+
#define USB_HID_VID 0x0d28
33+
#define USB_HID_PID_GENERIC 0x0206
34+
#define USB_HID_PID_KEYBOARD 0x0206
35+
#define USB_HID_PID_MOUSE 0x0206
36+
#define USB_HID_PID_GENERIC2 0x0007
3537

3638
#define MSG_VALUE_LEN 24
3739
#define MSG_KEY_LEN 24
@@ -300,7 +302,7 @@ void test_class_requests()
300302
template<uint8_t REPORT_SIZE> // Range [1, MAX_HID_REPORT_SIZE].
301303
void test_generic_raw_io()
302304
{
303-
TestUSBHID usb_hid(USB_HID_VID, USB_HID_PID_GENERIC, usb_dev_sn, REPORT_SIZE, REPORT_SIZE);
305+
TestUSBHID usb_hid(USB_HID_VID, USB_HID_PID_GENERIC2, usb_dev_sn, REPORT_SIZE, REPORT_SIZE);
304306
usb_hid.connect();
305307
greentea_send_kv(MSG_KEY_TEST_RAW_IO, REPORT_SIZE);
306308
usb_hid.wait_ready();

0 commit comments

Comments
 (0)