Skip to content

Commit 893a125

Browse files
authored
Merge pull request adafruit#3338 from jepler/endpoint-count-checking-stm32f405
add endpoint count checking on stm32f405
2 parents ac06202 + 563e038 commit 893a125

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ports/stm/mpconfigport.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ifeq ($(MCU_VARIANT),STM32F405xx)
77
CIRCUITPY_FRAMEBUFFERIO ?= 1
88
CIRCUITPY_RGBMATRIX ?= 1
99
CIRCUITPY_SDIOIO ?= 1
10+
USB_NUM_EP = 4
1011
endif
1112

1213
ifeq ($(MCU_SERIES),F4)

tools/gen_usb_descriptor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,9 @@ def strings_in_order(cls):
382382
for interface in interfaces:
383383
for subdescriptor in interface.subdescriptors:
384384
endpoint_address = getattr(subdescriptor, 'bEndpointAddress', 0) & 0x7f
385-
if endpoint_address > args.max_ep:
386-
raise ValueError("Endpoint address %d of %s may not exceed %d" % (endpoint_address & 0x7f, interface.description, args.max_ep))
385+
print("Endpoint %d - vs max_ep %d" % (endpoint_address, args.max_ep))
386+
if endpoint_address >= args.max_ep:
387+
raise ValueError("Endpoint address %d of %s must be less than %d" % (endpoint_address & 0x7f, interface.description, args.max_ep))
387388
else:
388389
print("Unable to check whether maximum number of endpoints is respected", file=sys.stderr)
389390

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy