Skip to content

Restrict endpoint packet sizes at usb-device level? #71

@ianrrees

Description

@ianrrees

The USB spec imposes some constraints on the max packet sizes allowed for particular types of endpoint. In the ATSAMD implementation of usb-device, we have a bit of code that panics if an endpoint allocation is attempted that doesn't fit requirements. My immediate problem is that code not allowing isochronous endpoints to be their full range of sizes (it's fine for an isochronous endpoint to have a max packet size of 200B for instance), but that code doesn't have visibility of the type of endpoint being allocated.

So, I'm wondering if it makes sense to have usb-device check that endpoint sizes are OK in terms of the spec, perhaps here - there will obviously be additional constraints imposed at the hardware layer, but this would have usb-device enforce the USB spec requirements, leaving the hardware requirements to the their implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions