Skip to content

usb_cdc.serial.read() doc says it reads one byte, but it will read as much as possible #9365

@dhalbert

Description

@dhalbert

Right now the documentation for usb_cdc.serial.read() gives the signature as usb_cdc.serial.read(size = 1). That is, it reads a at most a single byte. This does not match the implementation: it actually tries to read as much as possible, because it uses the standard stream operation read(), which has those semantics.

Pyserial's read() has the same signature and does read only one byte if no argument is given. I think our original intention was to match pyserial.

So rather than change the documentation, we should probably fix the implementation.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    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