Do some edits for serial redirect (#605)

* Do some edits for serial redirect

* Broken links
This commit is contained in:
Galen Nickel
2017-12-15 16:46:16 -08:00
committed by GitHub
parent 8ef85ba14f
commit aee9b84b31
8 changed files with 66 additions and 51 deletions

View File

@ -412,17 +412,17 @@
"serial.delimiters": "Returns the delimiter corresponding string",
"serial.onDataReceived": "Registers an event to be fired when one of the delimiter is matched.",
"serial.onDataReceived|param|delimiters": "the characters to match received characters against.",
"serial.readBuffer": "Reads multiple characters from the receive buffer. Pauses until enough characters are present.",
"serial.readBuffer": "Read multiple characters from the receive buffer. Pause until enough characters are present.",
"serial.readBuffer|param|length": "default buffer length, eg: 64",
"serial.readLine": "Reads a line of text from the serial port.",
"serial.readString": "Reads the buffered received data as a string",
"serial.readUntil": "Reads a line of text from the serial port and returns the buffer when the delimiter is met.",
"serial.readUntil|param|delimiter": "text delimiter that separates each text chunk",
"serial.redirect": "Dynamically configuring the serial instance to use pins other than USBTX and USBRX.",
"serial.redirectToUSB": "Redirects the serial instance to USBTX and USBRX.",
"serial.redirect": "Set the serial input and output to use pins instead of the USB connection.",
"serial.redirectToUSB": "Direct the serial input and output to use the USB connection.",
"serial.redirect|param|rate": "the new baud rate. eg: 115200",
"serial.redirect|param|rx": "the new reception pin, eg: SerialPin.P1",
"serial.redirect|param|tx": "the new transmission pins, eg: SerialPin.P0",
"serial.redirect|param|tx": "the new transmission pin, eg: SerialPin.P0",
"serial.writeBuffer": "Sends a buffer through Serial connection",
"serial.writeLine": "Prints a line of text to the serial",
"serial.writeNumber": "Prints a numeric value to the serial",

View File

@ -121,7 +121,7 @@ namespace serial {
}
/**
* Reads multiple characters from the receive buffer. Pauses until enough characters are present.
* Read multiple characters from the receive buffer. Pause until enough characters are present.
* @param length default buffer length, eg: 64
*/
//% blockId=serial_readbuffer block="serial|read buffer %length"
@ -139,13 +139,13 @@ namespace serial {
}
/**
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
* @param tx the new transmission pins, eg: SerialPin.P0
* Set the serial input and output to use pins instead of the USB connection.
* @param tx the new transmission pin, eg: SerialPin.P0
* @param rx the new reception pin, eg: SerialPin.P1
* @param rate the new baud rate. eg: 115200
*/
//% weight=10
//% help=serial/redirect-to
//% help=serial/redirect
//% blockId=serial_redirect block="serial|redirect to|TX %tx|RX %rx|at baud rate %rate"
//% blockExternalInputs=1
//% tx.fieldEditor="gridpicker" tx.fieldOptions.columns=3
@ -162,7 +162,7 @@ namespace serial {
}
/**
* Redirects the serial instance to USBTX and USBRX.
* Direct the serial input and output to use the USB connection.
*/
//% weight=9 help=serial/redirect-to-usb
//% blockId=serial_redirect_to_usb block="serial|redirect to USB"

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

@ -811,7 +811,7 @@ declare namespace serial {
function writeBuffer(buffer: Buffer): void;
/**
* Reads multiple characters from the receive buffer. Pauses until enough characters are present.
* Read multiple characters from the receive buffer. Pause until enough characters are present.
* @param length default buffer length, eg: 64
*/
//% blockId=serial_readbuffer block="serial|read buffer %length"
@ -819,13 +819,13 @@ declare namespace serial {
function readBuffer(length: number): Buffer;
/**
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
* @param tx the new transmission pins, eg: SerialPin.P0
* Set the serial input and output to use pins instead of the USB connection.
* @param tx the new transmission pin, eg: SerialPin.P0
* @param rx the new reception pin, eg: SerialPin.P1
* @param rate the new baud rate. eg: 115200
*/
//% weight=10
//% help=serial/redirect-to
//% help=serial/redirect
//% blockId=serial_redirect block="serial|redirect to|TX %tx|RX %rx|at baud rate %rate"
//% blockExternalInputs=1
//% tx.fieldEditor="gridpicker" tx.fieldOptions.columns=3
@ -836,7 +836,7 @@ declare namespace serial {
function redirect(tx: SerialPin, rx: SerialPin, rate: BaudRate): void;
/**
* Redirects the serial instance to USBTX and USBRX.
* Direct the serial input and output to use the USB connection.
*/
//% weight=9 help=serial/redirect-to-usb
//% blockId=serial_redirect_to_usb block="serial|redirect to USB" shim=serial::redirectToUSB