Add some descriptive info to serial docs (#704)

* Local commit

* Add some descriptive info to serial docs

* Example typo

* Tiny edit
This commit is contained in:
Galen Nickel
2018-03-09 13:14:24 -08:00
committed by Peli de Halleux
parent 13f20bfcad
commit ddc9aeae35
6 changed files with 53 additions and 36 deletions

10
libs/core/shims.d.ts vendored
View File

@ -772,7 +772,7 @@ declare namespace pins {
declare namespace serial {
/**
* Reads a line of text from the serial port and returns the buffer when the delimiter is met.
* Read a line of text from the serial port and return the buffer when the delimiter is met.
* @param delimiter text delimiter that separates each text chunk
*/
//% help=serial/read-until
@ -781,7 +781,7 @@ declare namespace serial {
function readUntil(delimiter: string): string;
/**
* Reads the buffered received data as a string
* Read the buffered received data as a string
*/
//% help=serial/read-string
//% blockId=serial_read_buffer block="serial|read string"
@ -789,7 +789,7 @@ declare namespace serial {
function readString(): string;
/**
* Registers an event to be fired when one of the delimiter is matched.
* Register an event to be fired when one of the delimiter is matched.
* @param delimiters the characters to match received characters against.
*/
//% help=serial/on-data-received
@ -797,7 +797,7 @@ declare namespace serial {
function onDataReceived(delimiters: string, body: () => void): void;
/**
* Sends a piece of text through Serial connection.
* Send a piece of text through the serial connection.
*/
//% help=serial/write-string
//% weight=87 blockGap=8
@ -805,7 +805,7 @@ declare namespace serial {
function writeString(text: string): void;
/**
* Sends a buffer through Serial connection
* Send a buffer through serial connection
*/
//% blockId=serial_writebuffer block="serial|write buffer %buffer"
//% help=serial/write-buffer advanced=true weight=6 shim=serial::writeBuffer