Adding serial.set(Rx|Tx)BufferSize (#1931)
* Fix for https://github.com/Microsoft/pxt-microbit/issues/1929 * bump pxt * updated docs * fix default values * moving dialogs to react * moving to react * typo * typo
This commit is contained in:
@@ -191,4 +191,23 @@ namespace serial {
|
||||
uBit.serial.redirect(USBTX, USBRX);
|
||||
uBit.serial.baud(115200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the RX buffer in bytes
|
||||
* @param size length of the rx buffer in bytes, eg: 32
|
||||
*/
|
||||
//% help=serial/set-rx-buffer-size
|
||||
void setRxBufferSize(uint8_t size) {
|
||||
uBit.serial.setRxBufferSize(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the TX buffer in bytes
|
||||
* @param size length of the tx buffer in bytes, eg: 32
|
||||
*/
|
||||
//% help=serial/set-tx-buffer-size
|
||||
void setTxBufferSize(uint8_t size) {
|
||||
uBit.serial.setTxBufferSize(size);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user