Do some edits for serial redirect (#605)
* Do some edits for serial redirect * Broken links
This commit is contained in:
10
libs/core/shims.d.ts
vendored
10
libs/core/shims.d.ts
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user