Skip to content

Commit ce2eb12

Browse files
MicroPython: Sort the API object alphabetically.
This commit does not change the API at all, just sorts it. This will make future diffs easiert to verify.
1 parent bdbfa11 commit ce2eb12

File tree

1 file changed

+55
-55
lines changed

1 file changed

+55
-55
lines changed

js/micropythonapi.js

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,62 @@ var microPythonApi = (function () {
55
'use strict';
66

77
var uPyBaseApi = {
8-
"microbit" : {
9-
"Image" : ["ALL_CLOCKS", "ANGRY", "ARROW_E", "ARROW_N", "ARROW_NE", "ARROW_NW", "ARROW_S", "ARROW_SE", "ARROW_SW", "ARROW_W", "ASLEEP", "BUTTERFLY", "CHESSBOARD", "CLOCK1", "CLOCK10", "CLOCK11", "CLOCK12", "CLOCK2", "CLOCK3", "CLOCK4", "CLOCK5", "CLOCK6", "CLOCK7", "CLOCK8", "CLOCK9", "CONFUSED", "COW", "DIAMOND", "DIAMOND_SMALL", "DUCK", "FABULOUS", "GHOST", "GIRAFFE", "HAPPY", "HEART", "HEART_SMALL", "HOUSE", "MEH", "MUSIC_CROTCHET", "MUSIC_QUAVER", "MUSIC_QUAVERS", "NO", "PACMAN", "PITCHFORK", "RABBIT", "ROLLERSKATE", "SAD", "SILLY", "SKULL", "SMILE", "SNAKE", "SQUARE", "SQUARE_SMALL", "STICKFIGURE", "SURPRISED", "SWORD", "TARGET", "TORTOISE", "TRIANGLE", "TRIANGLE_LEFT", "TSHIRT", "UMBRELLA", "XMAS", "YES"],
10-
"pin0" : ["is_touched", "read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
11-
"pin1" : ["is_touched", "read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
12-
"pin2" : ["is_touched", "read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
13-
"pin3" : ["read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
14-
"pin4" : ["read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
15-
"pin5" : ["read_digital", "write_digital"],
16-
"pin6" : ["read_digital", "write_digital"],
17-
"pin7" : ["read_digital", "write_digital"],
18-
"pin8" : ["read_digital", "write_digital"],
19-
"pin9" : ["read_digital", "write_digital"],
20-
"pin10" : ["read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
21-
"pin11" : ["read_digital", "write_digital"],
22-
"pin12" : ["read_digital", "write_digital"],
23-
"pin13" : ["read_digital", "write_digital"],
24-
"pin14" : ["read_digital", "write_digital"],
25-
"pin15" : ["read_digital", "write_digital"],
26-
"pin16" : ["read_digital", "write_digital"],
27-
"pin19" : ["read_digital", "write_digital"],
28-
"pin20" : ["read_digital", "write_digital"],
29-
"accelerometer" : ["current_gesture", "get_gestures", "get_values", "get_x", "get_y", "get_z", "was_gesture"],
30-
"button_a" : ["get_presses", "is_pressed", "was_pressed"],
31-
"button_b" : ["get_presses", "is_pressed", "was_pressed"],
32-
"compass" : ["calibrate", "clear_calibration", "get_field_strength", "get_x", "get_y", "get_z", "heading", "is_calibrated"],
33-
"display" : ["clear", "get_pixel", "is_on", "off", "on", "read_light_level", "scroll", "set_pixel", "show"],
34-
"i2c" : ["init", "read", "scan", "write"],
35-
"panic" : "",
36-
"reset" : "",
37-
"running_time" : "",
38-
"sleep" : "",
39-
"spi" : ["init", "read", "write", "write_readinto"],
40-
"temperature" : "",
41-
"uart" : ["any", "init", "read", "readall", "readline", "write"]
8+
"array": ["array"],
9+
"audio": ["AudioFrame", "play"],
10+
"collections": [ "OrderedDict", "namedtuple"],
11+
"gc": ["collect", "disable", "enable", "isenabled", "mem_alloc", "mem_free", "threshold"],
12+
"machine": ["disable_irq", "enable_irq", "freq", "reset", "time_pulse_us", "unique_id"],
13+
"math": ["acos", "asin", "atan", "atan2", "ceil", "copysign", "cos", "degrees", "e", "exp", "fabs", "floor", "fmod", "frexp", "isfinite", "isinf", "isnan", "ldexp", "log", "modf", "pi", "pow", "radians", "sin", "sqrt", "tan", "trunc"],
14+
"microbit": {
15+
"Image": ["ALL_CLOCKS", "ANGRY", "ARROW_E", "ARROW_N", "ARROW_NE", "ARROW_NW", "ARROW_S", "ARROW_SE", "ARROW_SW", "ARROW_W", "ASLEEP", "BUTTERFLY", "CHESSBOARD", "CLOCK1", "CLOCK10", "CLOCK11", "CLOCK12", "CLOCK2", "CLOCK3", "CLOCK4", "CLOCK5", "CLOCK6", "CLOCK7", "CLOCK8", "CLOCK9", "CONFUSED", "COW", "DIAMOND", "DIAMOND_SMALL", "DUCK", "FABULOUS", "GHOST", "GIRAFFE", "HAPPY", "HEART", "HEART_SMALL", "HOUSE", "MEH", "MUSIC_CROTCHET", "MUSIC_QUAVER", "MUSIC_QUAVERS", "NO", "PACMAN", "PITCHFORK", "RABBIT", "ROLLERSKATE", "SAD", "SILLY", "SKULL", "SMILE", "SNAKE", "SQUARE", "SQUARE_SMALL", "STICKFIGURE", "SURPRISED", "SWORD", "TARGET", "TORTOISE", "TRIANGLE", "TRIANGLE_LEFT", "TSHIRT", "UMBRELLA", "XMAS", "YES"],
16+
"accelerometer": ["current_gesture", "get_gestures", "get_values", "get_x", "get_y", "get_z", "was_gesture"],
17+
"button_a": ["get_presses", "is_pressed", "was_pressed"],
18+
"button_b": ["get_presses", "is_pressed", "was_pressed"],
19+
"compass": ["calibrate", "clear_calibration", "get_field_strength", "get_x", "get_y", "get_z", "heading", "is_calibrated"],
20+
"display": ["clear", "get_pixel", "is_on", "off", "on", "read_light_level", "scroll", "set_pixel", "show"],
21+
"i2c": ["init", "read", "scan", "write"],
22+
"panic": "",
23+
"pin0": ["is_touched", "read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
24+
"pin1": ["is_touched", "read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
25+
"pin10": ["read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
26+
"pin11": ["read_digital", "write_digital"],
27+
"pin12": ["read_digital", "write_digital"],
28+
"pin13": ["read_digital", "write_digital"],
29+
"pin14": ["read_digital", "write_digital"],
30+
"pin15": ["read_digital", "write_digital"],
31+
"pin16": ["read_digital", "write_digital"],
32+
"pin19": ["read_digital", "write_digital"],
33+
"pin2": ["is_touched", "read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
34+
"pin20": ["read_digital", "write_digital"],
35+
"pin3": ["read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
36+
"pin4": ["read_analog", "read_digital", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
37+
"pin5": ["read_digital", "write_digital"],
38+
"pin6": ["read_digital", "write_digital"],
39+
"pin7": ["read_digital", "write_digital"],
40+
"pin8": ["read_digital", "write_digital"],
41+
"pin9": ["read_digital", "write_digital"],
42+
"reset": "",
43+
"running_time": "",
44+
"sleep": "",
45+
"spi": ["init", "read", "write", "write_readinto"],
46+
"temperature": "",
47+
"uart": ["any", "init", "read", "readall", "readline", "write"]
4248
},
43-
"audio" : ["play", "AudioFrame"],
44-
"machine" : ["disable_irq", "enable_irq", "freq", "reset", "time_pulse_us", "unique_id"],
45-
"micropython" : ["const", "heap_lock", "heap_unlock", "kbd_intr", "mem_info", "opt_level", "qstr_info", "stack_use"],
46-
"music" : ["BADDY", "BA_DING", "BIRTHDAY", "BLUES", "CHASE", "DADADADUM", "ENTERTAINER", "FUNERAL", "FUNK", "JUMP_DOWN", "JUMP_UP", "NYAN", "ODE", "POWER_DOWN", "POWER_UP", "PRELUDE", "PUNCHLINE", "PYTHON", "RINGTONE", "WAWAWAWAA", "WEDDING", "get_tempo", "pitch", "play", "reset", "set_temp", "stop"],
47-
"speech" : ["pronounce", "say", "sing", "translate"],
48-
"radio" : ["RATE_1MBIT", "RATE_250KBIT", "RATE_2MBIT", "config", "off", "on", "receive", "receive_bytes", "receive_bytes_into", "receive_full", "reset", "send", "send_bytes"],
49-
"os" : ["remove", "listdir", "size", "uname"],
50-
"time" : ["sleep", "sleep_ms", "sleep_us", "ticks_ms", "ticks_us", "ticks_add", "ticks_diff"],
51-
"utime" : ["sleep", "sleep_ms", "sleep_us", "ticks_ms", "ticks_us", "ticks_add", "ticks_diff"],
52-
"ucollections" : ["namedtuple", "OrderedDict"],
53-
"collections" : ["namedtuple", "OrderedDict"],
54-
"array" : ["array"],
55-
"math" : ["e", "pi", "sqrt", "pow", "exp", "log", "cos", "sin", "tan", "acos", "asin", "atan", "atan2", "ceil", "copysign", "fabs", "floor", "fmod", "frexp", "ldexp", "modf", "isfinite", "isinf", "isnan", "trunc", "radians", "degrees"],
56-
"random" : ["getrandbits", "seed", "randrange", "randint", "choice", "random", "uniform"],
57-
"ustruct" : ["calcsize", "pack", "pack_into", "unpack", "unpack_from"],
58-
"struct" : ["calcsize", "pack", "pack_into", "unpack", "unpack_from"],
59-
"sys" : ["version", "version_info", "implementation", "platform", "byteorder", "exit", "print_exception"],
60-
"gc" : ["collect", "disable", "enable", "isenabled", "mem_free", "mem_alloc", "threshold"],
61-
"neopixel" : {
49+
"micropython": ["const", "heap_lock", "heap_unlock", "kbd_intr", "mem_info", "opt_level", "qstr_info", "stack_use"],
50+
"music": ["BADDY", "BA_DING", "BIRTHDAY", "BLUES", "CHASE", "DADADADUM", "ENTERTAINER", "FUNERAL", "FUNK", "JUMP_DOWN", "JUMP_UP", "NYAN", "ODE", "POWER_DOWN", "POWER_UP", "PRELUDE", "PUNCHLINE", "PYTHON", "RINGTONE", "WAWAWAWAA", "WEDDING", "get_tempo", "pitch", "play", "reset", "set_tempo", "stop"],
51+
"neopixel": {
6252
"NeoPixel" : ["clear", "show"]
63-
}
53+
},
54+
"os": ["listdir", "remove", "size", "uname"],
55+
"radio": ["RATE_1MBIT", "RATE_250KBIT", "RATE_2MBIT", "config", "off", "on", "receive", "receive_bytes", "receive_bytes_into", "receive_full", "reset", "send", "send_bytes"],
56+
"random": ["choice", "getrandbits", "randint", "random", "randrange", "seed", "uniform"],
57+
"speech": ["pronounce", "say", "sing", "translate"],
58+
"struct": ["calcsize", "pack", "pack_into", "unpack", "unpack_from"],
59+
"sys": ["byteorder", "exit", "implementation", "platform", "print_exception", "version", "version_info"],
60+
"time": ["sleep", "sleep_ms", "sleep_us", "ticks_add", "ticks_diff", "ticks_ms", "ticks_us"],
61+
"ucollections": [ "OrderedDict", "namedtuple"],
62+
"ustruct": ["calcsize", "pack", "pack_into", "unpack", "unpack_from"],
63+
"utime": ["sleep", "sleep_ms", "sleep_us", "ticks_add", "ticks_diff", "ticks_ms", "ticks_us"],
6464
};
6565

6666
var extraModules = {
@@ -69,7 +69,7 @@ var microPythonApi = (function () {
6969
"pin_logo": ["is_touched"],
7070
"pin_speaker": ["disable", "enable", "get_analog_period_microseconds", "set_analog_period", "set_analog_period_microseconds", "write_analog", "write_digital"],
7171
"set_volume": "",
72-
"audio" : ["play", "AudioFrame", "stop", "is_playing"],
72+
"audio" : ["AudioFrame","is_playing", "play", "stop"],
7373
"Sound": ["GIGGLE", "HAPPY", "HELLO", "MYSTERIOUS", "SAD", "SLIDE", "SOARING", "SPRING", "TWINKLE", "YAWN"],
7474
"SoundEvent": ["LOUD", "QUIET"]
7575
},

0 commit comments

Comments
 (0)