You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I'm now thinking we may not necessarily want to mimic pyserial so closely. pyserial also oddly released v3.5 to pypi but did not tag the release in github, which shows the last release as v3.4. There have been no commits to master since August 2023.
Right now the documentation for
usb_cdc.serial.read()
gives the signature asusb_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 operationread()
, 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.
The text was updated successfully, but these errors were encountered: