Skip to content

This magic number constant should be replaced by a #define or const int #402

Open
@liudr

Description

@liudr

if (!((_cmark + 1) & 0x3F))

Was looking at why I'm not able to emulate a keyboard with 8-byte bMaxPacketSize0. Took me a while to hunt this one down, was looking for 64 all over but found 0x3F.
Suggest:
#define bMaxPacketSize0_64 64
Then use (bMaxPacketSize0_64-1) for clarity.

I know it's just my opinion but this USB device stack could use more clarity and documentation. It would make it much easier to expand.

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