Merge branch 'master' of github.com:Microsoft/kindscript-microbit

This commit is contained in:
Michal Moskal 2016-03-11 17:17:24 -08:00
commit 19f40d27ff
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ namespace ks.rt.micro_bit {
} }
export enum PinMode { export enum PinMode {
Unused = 0,
Digital = 0x0001, Digital = 0x0001,
Analog = 0x0002, Analog = 0x0002,
Input = 0x0004, Input = 0x0004,
@ -20,7 +21,7 @@ namespace ks.rt.micro_bit {
constructor(public id: number) {} constructor(public id: number) {}
touched = false; touched = false;
value = 0; value = 0;
mode = PinMode.Digital | PinMode.Output; mode = PinMode.Unused;
isTouched() : boolean { isTouched() : boolean {
this.mode = PinMode.Touch; this.mode = PinMode.Touch;