Migrate serial

This commit is contained in:
Michal Moskal
2016-04-01 22:00:42 -07:00
parent 0130ecb0c2
commit 6bf46577f9
6 changed files with 72 additions and 27 deletions

View File

@@ -452,4 +452,34 @@ declare namespace pins {
function analogPitch(frequency: number, ms: number): void;
}
//% weight=2 color=30
declare namespace serial {
/**
* Reads a line of text from the serial port.
*/
//% shim=serial::readString
function readString(): string;
/**
* Sends a piece of text through Serial connection.
*/
//% shim=serial::writeString
function writeString(text: string): void;
/**
* Sends the current pixel values, byte-per-pixel, over serial.
*/
//% shim=serial::writeScreen
function writeScreen(): void;
/**
* Reads the screen from serial.
*/
//% shim=serial::readScreen
function readScreen(): void;
}
// Auto-generated. Do not edit. Really.