Closed
Description
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.