reference-en icon indicating copy to clipboard operation
reference-en copied to clipboard

Reference of Serial.availableForWrite() does not state what returned value is nor where to find out.

Open brewmanz opened this issue 4 years ago • 1 comments

https://www.arduino.cc/reference/en/language/functions/communication/serial/availableforwrite/ does not tell the user about the returned value:

  • What its datatype is (signed or not, whether 8 or 16 or ... bits)
  • Where to find out this information

I want to check that there is enough space for non-blocking writes; and so what type/size of variable do I need to use? For i have an Arduino chip of very little brain, and long words or other datatypes bother me^. Yes, I've since discovered that it's an int, but why not just tell people without making them search the source?

^ Apologies to A. A. Milne

brewmanz avatar Nov 14 '21 23:11 brewmanz

This is a small piece of the big picture, which is that the essential documentation of parameter and return types is missing or incorrect throughout much of the reference: https://github.com/arduino/reference-en/issues/15

per1234 avatar Nov 14 '21 23:11 per1234