summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKamil Tomaszewski <kamil.tomaszewski@sony.com>2019-10-08 09:35:04 +0200
committerKamil Tomaszewski <kamil.tomaszewski@sony.com>2019-10-08 09:35:04 +0200
commit79096dbacdcfffe9e097b6fb0706b5cbc625568c (patch)
treef8b1b86bcb7639855d8017c9ec8a44253a6b5c44 /tools
parent29844db332f3498166c938f25d9129c827ebf755 (diff)
Add the specific endpoint names
Diffstat (limited to 'tools')
-rw-r--r--tools/gen_usb_descriptor.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py
index 74f6584f8..34bca1170 100644
--- a/tools/gen_usb_descriptor.py
+++ b/tools/gen_usb_descriptor.py
@@ -67,21 +67,30 @@ if unknown_hid_devices:
if not args.renumber_endpoints:
if 'CDC' in args.devices:
- if (args.cdc_ep_num_notification == 0 or args.cdc_ep_num_data_out == 0 or
- args.cdc_ep_num_data_in == 0):
- raise ValueError("Endpoint address must not be 0")
+ if args.cdc_ep_num_notification == 0:
+ raise ValueError("CDC notification endpoint number must not be 0")
+ elif args.cdc_ep_num_data_out == 0:
+ raise ValueError("CDC data OUT endpoint number must not be 0")
+ elif args.cdc_ep_num_data_in == 0):
+ raise ValueError("CDC data IN endpoint number must not be 0")
if 'MSC' in args.devices:
- if args.msc_ep_num_out == 0 or args.msc_ep_num_in == 0:
- raise ValueError("Endpoint address must not be 0")
+ if args.msc_ep_num_out == 0:
+ raise ValueError("MSC endpoint OUT number must not be 0")
+ elif args.msc_ep_num_in == 0:
+ raise ValueError("MSC endpoint IN number must not be 0")
if 'HID' in args.devices:
- if args.args.hid_ep_num_out == 0 or args.hid_ep_num_in == 0:
- raise ValueError("Endpoint address must not be 0")
+ if args.args.hid_ep_num_out == 0:
+ raise ValueError("HID endpoint OUT number must not be 0")
+ elif args.hid_ep_num_in == 0:
+ raise ValueError("HID endpoint IN number must not be 0")
if 'AUDIO' in args.devices:
- if args.midi_ep_num_out == 0 or args.midi_ep_num_in == 0:
- raise ValueError("Endpoint address must not be 0")
+ if args.args.midi_ep_num_out == 0:
+ raise ValueError("MIDI endpoint OUT number must not be 0")
+ elif args.midi_ep_num_in == 0:
+ raise ValueError("MIDI endpoint IN number must not be 0")
class StringIndex:
"""Assign a monotonically increasing index to each unique string. Start with 0."""