Fixing serial buffer docs (#600)

* Fixing serial buffer docs

* updated shims
This commit is contained in:
Peli de Halleux
2017-12-11 00:37:57 -08:00
committed by GitHub
parent ac78b0c95a
commit 26680823ff
4 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Serial Read Buffer
Read the buffered serial data as a buffer
Read the buffered serial data as a buffer.
```sig
serial.readBuffer(64);
@ -8,5 +8,12 @@ serial.readBuffer(64);
## Returns
* a Buffer containing input from the serial port. Empty if no data available.
* a Buffer containing input from the serial port. The length of the buffer may be smaller than the requested length.
## Remarks
If the desired number of characters are available, this will return a string with the expected size. Otherwise, the calling fiber sleeps until the desired number of characters have been read.
## See Also
[micro:bit DAL documentation](https://lancaster-university.github.io/microbit-docs/ubit/serial/#managedstring-read-int-size-microbitserialmode-mode)