Skip to content

machine.USBDevice support for vendor requests #17048

Open
@emard

Description

@emard

Description

Is there possible to have some USB callback that would handle USB vendor specific requests?
I tried to develop but I'm stuck here, USB_REQ_TYPE_CLASS works but USB_REQ_TYPE_VENDOR
doesn't. If I can recompile micropython with this enabled, tell me how should I somehow
enable CFG_TUD_VENDOR and in what file for ESP32S3 SPIRAM OCT should I edit to enable this

currently practical problem is described here for example

if stage == 1: # SETUP
# BUG USB_REQ_TYPE_VENDOR requests don't work
if bmRequestType == USB_DIR_OUT | USB_REQ_TYPE_CLASS | USB_REQ_RECIP_DEVICE:
#if bmRequestType == USB_DIR_OUT | USB_REQ_TYPE_VENDOR | USB_REQ_RECIP_DEVICE:
# Data coming from host, prepare to receive it.
return memoryview(usb_buf)[:wLength]

Code Size

No response

Implementation

I hope the MicroPython maintainers or community will implement this feature

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests, new feature implementationssharedRelates to shared/ directory in source

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions