diff --git a/docs/reference.md b/docs/reference.md index f8008e57..b0d31a4c 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -8,9 +8,9 @@ input.onButtonPressed(Button.A, () => {}); led.plot(0,0); radio.sendNumber(0); music.playTone(music.noteFrequency(Note.C), music.beat(BeatFraction.Whole)); -game.createSprite(); +game.createSprite(2,2); pins.digitalReadPin(DigitalPin.P0); -serial.WriteLine("Hello!") +serial.writeLine("Hello!"); control.inBackground(() => {}); ``` diff --git a/libs/microbit/control.cpp b/libs/microbit/control.cpp index 9451cf48..cf99b2aa 100644 --- a/libs/microbit/control.cpp +++ b/libs/microbit/control.cpp @@ -113,6 +113,9 @@ enum EventBusValue { MES_REMOTE_CONTROL_EVT_VOLUMEUP_ = MES_REMOTE_CONTROL_EVT_VOLUMEUP, }; +/** +* Runtime and event utilities. +*/ //% weight=1 color="#333333" namespace control { void fiberDone(void *a) diff --git a/libs/microbit/game.ts b/libs/microbit/game.ts index 6af2db6a..6fbd21cb 100644 --- a/libs/microbit/game.ts +++ b/libs/microbit/game.ts @@ -18,6 +18,9 @@ enum LedSpriteProperty { Blink } +/** + * A single-LED sprite game engine + */ //% color=176 weight=32 namespace game { var _score: number = 0; diff --git a/libs/microbit/images.cpp b/libs/microbit/images.cpp index 92b1b74e..71a4f1dd 100644 --- a/libs/microbit/images.cpp +++ b/libs/microbit/images.cpp @@ -1,5 +1,8 @@ #include "ksbit.h" +/** +* Creation, manipulation and display of LED images. +*/ //% color=45 weight=31 namespace images { /** diff --git a/libs/microbit/input.ts b/libs/microbit/input.ts index d5f385bf..35393132 100644 --- a/libs/microbit/input.ts +++ b/libs/microbit/input.ts @@ -1,3 +1,6 @@ +/** + * Events and data from sensors + */ //% color=300 weight=99 namespace input { /** diff --git a/libs/microbit/led.ts b/libs/microbit/led.ts index 86243223..3b49105b 100644 --- a/libs/microbit/led.ts +++ b/libs/microbit/led.ts @@ -1,3 +1,6 @@ +/** + * Control of the LED screen. + */ //% color=3 weight=35 namespace led { diff --git a/libs/microbit/music.ts b/libs/microbit/music.ts index ca9d2a8f..996105e9 100644 --- a/libs/microbit/music.ts +++ b/libs/microbit/music.ts @@ -74,6 +74,9 @@ enum BeatFraction { Sixteenth = 16 } +/** + * Generation of music tones through pin ``P0``. + */ //% color=52 weight=33 namespace music { var beatsPerMinute: number = 120; diff --git a/libs/microbit/pins.ts b/libs/microbit/pins.ts index 3b82f131..53da784f 100644 --- a/libs/microbit/pins.ts +++ b/libs/microbit/pins.ts @@ -1,3 +1,6 @@ +/** + * Control currents in Pins for analog/digital signals, servos, i2c, ... + */ //% color=351 weight=30 namespace pins { /** diff --git a/libs/microbit/serial.ts b/libs/microbit/serial.ts index e4637dda..0418818e 100644 --- a/libs/microbit/serial.ts +++ b/libs/microbit/serial.ts @@ -1,3 +1,6 @@ +/** + * Reading and writing data over a serial connection. + */ //% weight=2 color=30 namespace serial { /** diff --git a/libs/microbit/shims.d.ts b/libs/microbit/shims.d.ts index f1e531c5..6599c722 100644 --- a/libs/microbit/shims.d.ts +++ b/libs/microbit/shims.d.ts @@ -1,7 +1,9 @@ // Auto-generated. Do not edit. - + /** + * Creation, manipulation and display of LED images. + */ //% color=45 weight=31 declare namespace images { @@ -265,7 +267,9 @@ declare namespace input { } - + /** + * Runtime and event utilities. + */ //% weight=1 color="#333333" declare namespace control {