{
  "!name": "Espruino",
  "Nucleo": {
    "!type": "fn()",
    "!doc": "<p>This is the built-in class for the Arduino-style pin namings on ST Nucleo boards</p>\n",
    "!url": "http://www.espruino.com/Reference#Nucleo",
    "A0": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_A0"
    },
    "A1": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_A1"
    },
    "A2": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_A2"
    },
    "A3": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_A3"
    },
    "A4": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_A4"
    },
    "A5": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_A5"
    },
    "D0": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D0"
    },
    "D1": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D1"
    },
    "D2": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D2"
    },
    "D3": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D3"
    },
    "D4": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D4"
    },
    "D5": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D5"
    },
    "D6": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D6"
    },
    "D7": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D7"
    },
    "D8": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D8"
    },
    "D9": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D9"
    },
    "D10": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D10"
    },
    "D11": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D11"
    },
    "D12": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D12"
    },
    "D13": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D13"
    },
    "D14": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D14"
    },
    "D15": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Nucleo_D15"
    }
  },
  "NodeMCU": {
    "!type": "fn()",
    "!doc": "<p>This is a built-in class to allow you to use the ESP8266 NodeMCU boards&#39;s pin namings to access pins. It is only available on ESP8266-based boards.</p>\n",
    "!url": "http://www.espruino.com/Reference#NodeMCU",
    "A0": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_A0"
    },
    "D0": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D0"
    },
    "D1": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D1"
    },
    "D2": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D2"
    },
    "D3": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D3"
    },
    "D4": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D4"
    },
    "D5": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D5"
    },
    "D6": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D6"
    },
    "D7": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D7"
    },
    "D8": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D8"
    },
    "D9": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D9"
    },
    "D10": {
      "!type": "+Pin",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_NodeMCU_D10"
    }
  },
  "ESP8266": {
    "!type": "fn()",
    "!doc": "<p>The ESP8266 library is specific to the ESP8266 version of Espruino, i.e., running Espruino on an ESP8266 module (not to be confused with using the ESP8266 as Wifi add-on to an Espruino board).  This library contains functions to handle ESP8266-specific actions.\nFor example: <code>var esp8266 = require(&#39;ESP8266&#39;); esp8266.reboot();</code> performs a hardware reset of the module.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_ESP8266_undefined",
    "reboot": {
      "!type": "fn()",
      "!doc": "<p>Perform a hardware reset/reboot of the esp8266.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_reboot"
    },
    "getResetInfo": {
      "!type": "fn() -> +RstInfo",
      "!doc": "<p>At boot time the esp8266&#39;s firmware captures the cause of the reset/reboot.  This function returns this information in an object with the following fields:</p>\n<ul>\n<li><code>reason</code>: &quot;power on&quot;, &quot;wdt reset&quot;, &quot;exception&quot;, &quot;soft wdt&quot;, &quot;restart&quot;, &quot;deep sleep&quot;, or &quot;reset pin&quot;</li>\n<li><code>exccause</code>: exception cause</li>\n<li><code>epc1</code>, <code>epc2</code>, <code>epc3</code>: instruction pointers</li>\n<li><code>excvaddr</code>: address being accessed</li>\n<li><code>depc</code>: (?)</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_getResetInfo"
    },
    "logDebug": {
      "!type": "fn(enable: bool)",
      "!doc": "<p>Enable or disable the logging of debug information.  A value of <code>true</code> enables debug logging while a value of <code>false</code> disables debug logging.  Debug output is sent to UART1 (gpio2).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_logDebug"
    },
    "setLog": {
      "!type": "fn(mode: number)",
      "!doc": "<p>Set the debug logging mode. It can be disabled (which frees ~1.2KB of heap), enabled in-memory only, or in-memory and output to a UART.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_setLog"
    },
    "printLog": {
      "!type": "fn()",
      "!doc": "<p>Prints the contents of the debug log to the console.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_printLog"
    },
    "readLog": {
      "!type": "fn()",
      "!doc": "<p>Returns one line from the log or up to 128 characters.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_readLog"
    },
    "dumpSocketInfo": {
      "!type": "fn()",
      "!doc": "<p>Dumps info about all sockets to the log. This is for troubleshooting the socket implementation.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_dumpSocketInfo"
    },
    "setCPUFreq": {
      "!type": "fn(freq: ?)",
      "!doc": "<p><strong>Note:</strong> This is deprecated. Use <code>E.setClock(80/160)</code>\n<strong>Note:</strong>\nSet the operating frequency of the ESP8266 processor. The default is 160Mhz.</p>\n<p><strong>Warning</strong>: changing the cpu frequency affects the timing of some I/O operations, notably of software SPI and I2C, so things may be a bit slower at 80Mhz.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_setCPUFreq"
    },
    "getState": {
      "!type": "fn() -> ?",
      "!doc": "<p>Returns an object that contains details about the state of the ESP8266 with the following fields:</p>\n<ul>\n<li><code>sdkVersion</code>   - Version of the SDK.</li>\n<li><code>cpuFrequency</code> - CPU operating frequency in Mhz.</li>\n<li><code>freeHeap</code>     - Amount of free heap in bytes.</li>\n<li><code>maxCon</code>       - Maximum number of concurrent connections.</li>\n<li><code>flashMap</code>     - Configured flash size&amp;map: &#39;512KB:256/256&#39; .. &#39;4MB:512/512&#39;</li>\n<li><code>flashKB</code>      - Configured flash size in KB as integer</li>\n<li><code>flashChip</code>    - Type of flash chip as string with manufacturer &amp; chip, ex: &#39;0xEF 0x4016`</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_getState"
    },
    "getFreeFlash": {
      "!type": "fn() -> ?",
      "!doc": "<p><strong>Note:</strong> This is deprecated. Use <code>require(&quot;Flash&quot;).getFree()</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_getFreeFlash"
    },
    "crc32": {
      "!type": "fn(arrayOfData: ?) -> ?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_crc32"
    },
    "neopixelWrite": {
      "!type": "fn(pin: +Pin, arrayOfData: ?)",
      "!doc": "<p><strong>This function is deprecated.</strong> Please use <code>require(&quot;neopixel&quot;).write(pin, data)</code> instead</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_neopixelWrite"
    },
    "deepSleep": {
      "!type": "fn(micros: ?, option: ?)",
      "!doc": "<p>Put the ESP8266 into &#39;deep sleep&#39; for the given number of microseconds, \nreducing power consumption drastically. </p>\n<p>meaning of option values:</p>\n<p>0 - the 108th Byte of init parameter decides whether RF calibration will be performed or not.</p>\n<p>1 - run RF calibration after waking up. Power consumption is high.</p>\n<p>2 - no RF calibration after waking up. Power consumption is low.</p>\n<p>4 - no RF after waking up. Power consumption is the lowest.</p>\n<p><strong>Note:</strong> unlike normal Espruino boards&#39; &#39;deep sleep&#39; mode, ESP8266 deep sleep actually turns off the processor. After the given number of microseconds have elapsed, the ESP8266 will restart as if power had been turned off and then back on. <em>All contents of RAM will be lost</em>. \nConnect GPIO 16 to RST to enable wakeup.</p>\n<p><strong>Special:</strong> 0 microseconds cause sleep forever until external wakeup RST pull down occurs.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_deepSleep"
    },
    "ping": {
      "!type": "fn(ipAddr: ?, pingCallback: ?)",
      "!doc": "<p><strong>DEPRECATED</strong> - please use <code>Wifi.ping</code> instead.</p>\n<p>Perform a network ping request. The parameter can be either a String or a numeric IP address.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP8266_ping"
    }
  },
  "Queue": {
    "!type": "fn(queueName: ?) -> ?",
    "!doc": "<p>Creates a Queue Object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Queue_Queue",
    "prototype": {
      "read": {
        "!type": "fn()",
        "!doc": "<p>reads one character from queue, if available</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Queue_read"
      },
      "writeChar": {
        "!type": "fn(char: ?)",
        "!doc": "<p>Writes one character to queue</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Queue_writeChar"
      },
      "log": {
        "!type": "fn()",
        "!doc": "<p>logs list of queues</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Queue_log"
      }
    }
  },
  "Task": {
    "!type": "fn(taskName: ?) -> ?",
    "!doc": "<p>Creates a Task Object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Task_Task",
    "prototype": {
      "suspend": {
        "!type": "fn()",
        "!doc": "<p>Suspend task, be careful not to suspend Espruino task itself</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Task_suspend"
      },
      "resume": {
        "!type": "fn()",
        "!doc": "<p>Resumes a suspended task</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Task_resume"
      },
      "getCurrent": {
        "!type": "fn() -> ?",
        "!doc": "<p>returns name of actual task</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Task_getCurrent"
      },
      "notify": {
        "!type": "fn()",
        "!doc": "<p>Sends a binary notify to task</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Task_notify"
      },
      "log": {
        "!type": "fn()",
        "!doc": "<p>logs list of tasks</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Task_log"
      }
    }
  },
  "Timer": {
    "!type": "fn(timerName: ?, group: number, index: number, isrIndex: number) -> ?",
    "!doc": "<p>Creates a Timer Object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Timer_Timer",
    "prototype": {
      "start": {
        "!type": "fn(duration: number)",
        "!doc": "<p>Starts a timer</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Timer_start"
      },
      "reschedule": {
        "!type": "fn(duration: number)",
        "!doc": "<p>Reschedules a timer, needs to be started at least once</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Timer_reschedule"
      },
      "log": {
        "!type": "fn()",
        "!doc": "<p>logs list of timers</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Timer_log"
      }
    }
  },
  "ESP32": {
    "!type": "fn()",
    "!doc": "<p>Class containing utility functions for the <a href=\"http://www.espruino.com/ESP32\">ESP32</a></p>\n",
    "!url": "http://www.espruino.com/Reference#ESP32",
    "setAtten": {
      "!type": "fn(pin: +Pin, atten: number)",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_ESP32_setAtten"
    },
    "reboot": {
      "!type": "fn()",
      "!doc": "<p>Perform a hardware reset/reboot of the ESP32.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP32_reboot"
    },
    "deepSleep": {
      "!type": "fn(us: number)",
      "!doc": "<p>Put device in deepsleep state for &quot;us&quot; microseconds.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP32_deepSleep"
    },
    "getState": {
      "!type": "fn() -> ?",
      "!doc": "<p>Returns an object that contains details about the state of the ESP32 with the following fields:</p>\n<ul>\n<li><code>sdkVersion</code>   - Version of the SDK.</li>\n<li><code>freeHeap</code>     - Amount of free heap in bytes.</li>\n<li><code>BLE</code>             - Status of BLE, enabled if true.</li>\n<li><code>Wifi</code>         - Status of Wifi, enabled if true.</li>\n<li><code>minHeap</code>      - Minimum heap, calculated by heap_caps_get_minimum_free_size</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP32_getState"
    },
    "setBLE_Debug": {
      "!type": "fn(level: number)",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_ESP32_setBLE_Debug"
    },
    "enableBLE": {
      "!type": "fn(enable: bool)",
      "!doc": "<p>Switches Bluetooth off/on, removes saved code from Flash, resets the board, \nand on restart creates jsVars depending on available heap (actual additional 1800)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP32_enableBLE"
    },
    "enableWifi": {
      "!type": "fn(enable: bool)",
      "!doc": "<p>Switches Wifi off/on, removes saved code from Flash, resets the board, \nand on restart creates jsVars depending on available heap (actual additional 3900)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_ESP32_enableWifi"
    }
  },
  "process": {
    "!type": "fn()",
    "!doc": "<p>This class contains information about Espruino itself</p>\n",
    "!url": "http://www.espruino.com/Reference#process",
    "version": {
      "!type": "?",
      "!doc": "<p>Returns the version of Espruino as a String</p>\n",
      "!url": "http://www.espruino.com/Reference#l_process_version"
    },
    "env": {
      "!type": "?",
      "!doc": "<p>Returns an Object containing various pre-defined variables. standard ones are BOARD, VERSION, FLASH, RAM, MODULES.</p>\n<p>For example, to get a list of built-in modules, you can use <code>process.env.MODULES.split(&#39;,&#39;)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_process_env"
    },
    "memory": {
      "!type": "fn() -> ?",
      "!doc": "<p>Run a Garbage Collection pass, and return an object containing information on memory usage.</p>\n<ul>\n<li><code>free</code>  : Memory that is available to be used (in blocks)</li>\n<li><code>usage</code> : Memory that has been used (in blocks)</li>\n<li><code>total</code> : Total memory (in blocks)</li>\n<li><code>history</code> : Memory used for command history - that is freed if memory is low. Note that this is INCLUDED in the figure for &#39;free&#39;</li>\n<li><code>gc</code>      : Memory freed during the GC pass</li>\n<li><code>gctime</code>  : Time taken for GC pass (in milliseconds)</li>\n<li><code>blocksize</code> : Size of a block (variable) in bytes</li>\n<li><code>stackEndAddress</code> : (on ARM) the address (that can be used with peek/poke/etc) of the END of the stack. The stack grows down, so unless you do a lot of recursion the bytes above this can be used.</li>\n<li><code>flash_start</code>      : (on ARM) the address of the start of flash memory (usually <code>0x8000000</code>)</li>\n<li><code>flash_binary_end</code> : (on ARM) the address in flash memory of the end of Espruino&#39;s firmware.</li>\n<li><code>flash_code_start</code> : (on ARM) the address in flash memory of pages that store any code that you save with <code>save()</code>.</li>\n<li><code>flash_length</code> : (on ARM) the amount of flash memory this firmware was built for (in bytes). <strong>Note:</strong> Some STM32 chips actually have more memory than is advertised.</li>\n</ul>\n<p>Memory units are specified in &#39;blocks&#39;, which are around 16 bytes each (depending on your device). The actual size is available in <code>blocksize</code>. See <a href=\"http://www.espruino.com/Performance\">http://www.espruino.com/Performance</a> for more information.</p>\n<p><strong>Note:</strong> To find free areas of flash memory, see <code>require(&#39;Flash&#39;).getFree()</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_process_memory"
    }
  },
  "ArrayBuffer": {
    "!type": "fn(byteLength: number) -> ?",
    "!doc": "<p>Create an Array Buffer object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_ArrayBuffer_ArrayBuffer",
    "prototype": {
      "byteLength": {
        "!type": "number",
        "!doc": "<p>The length, in bytes, of the <code>ArrayBuffer</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBuffer_byteLength"
      }
    }
  },
  "ArrayBufferView": {
    "!type": "fn()",
    "!doc": "<p>This is the built-in JavaScript class that is the prototype for:</p>\n<ul>\n<li><a href=\"/Reference#Uint8Array\">Uint8Array</a></li>\n<li><a href=\"/Reference#UintClamped8Array\">UintClamped8Array</a></li>\n<li><a href=\"/Reference#Int8Array\">Int8Array</a></li>\n<li><a href=\"/Reference#Uint16Array\">Uint16Array</a></li>\n<li><a href=\"/Reference#Int16Array\">Int16Array</a></li>\n<li><a href=\"/Reference#Uint24Array\">Uint24Array</a> (Espruino-specific - not standard JS)</li>\n<li><a href=\"/Reference#Uint32Array\">Uint32Array</a></li>\n<li><a href=\"/Reference#Int32Array\">Int32Array</a></li>\n<li><a href=\"/Reference#Float32Array\">Float32Array</a></li>\n<li><a href=\"/Reference#Float64Array\">Float64Array</a></li>\n</ul>\n<p>If you want to access arrays of differing types of data\nyou may also find <code>DataView</code> useful.</p>\n",
    "!url": "http://www.espruino.com/Reference#ArrayBufferView",
    "prototype": {
      "buffer": {
        "!type": "?",
        "!doc": "<p>The buffer this view references</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_buffer"
      },
      "byteLength": {
        "!type": "number",
        "!doc": "<p>The length, in bytes, of the <code>ArrayBufferView</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_byteLength"
      },
      "byteOffset": {
        "!type": "number",
        "!doc": "<p>The offset, in bytes, to the first byte of the view within the backing <code>ArrayBuffer</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_byteOffset"
      },
      "set": {
        "!type": "fn(arr: ?, offset: number)",
        "!doc": "<p>Copy the contents of <code>array</code> into this one, mapping <code>this[x+offset]=array[x];</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_set"
      },
      "map": {
        "!type": "fn(function: ?, thisArg: ?) -> +ArrayBufferView",
        "!doc": "<p>Return an array which is made from the following: <code>A.map(function) = [function(A[0]), function(A[1]), ...]</code></p>\n<p> <strong>Note:</strong> This returns an <code>ArrayBuffer</code> of the same type it was called on. To get an <code>Array</code>, use <code>Array.map</code>, eg. <code>[].map.call(myArray, x=&gt;x+1)</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_map"
      },
      "indexOf": {
        "!type": "fn(value: ?, startIndex: number) -> ?",
        "!doc": "<p>Return the index of the value in the array, or <code>-1</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_indexOf"
      },
      "includes": {
        "!type": "fn(value: ?, startIndex: number) -> bool",
        "!doc": "<p>Return <code>true</code> if the array includes the value, <code>false</code> otherwise</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_includes"
      },
      "join": {
        "!type": "fn(separator: ?) -> ?",
        "!doc": "<p>Join all elements of this array together into one string, using &#39;separator&#39; between them. eg. <code>[1,2,3].join(&#39; &#39;)==&#39;1 2 3&#39;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_join"
      },
      "sort": {
        "!type": "fn(var: ?) -> +ArrayBufferView",
        "!doc": "<p>Do an in-place quicksort of the array</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_sort"
      },
      "forEach": {
        "!type": "fn(function: ?, thisArg: ?)",
        "!doc": "<p>Executes a provided function once per array element.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_forEach"
      },
      "reduce": {
        "!type": "fn(callback: ?, initialValue: ?) -> ?",
        "!doc": "<p>Execute <code>previousValue=initialValue</code> and then <code>previousValue = callback(previousValue, currentValue, index, array)</code> for each element in the array, and finally return previousValue.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_reduce"
      },
      "fill": {
        "!type": "fn(value: ?, start: number, end: ?) -> +ArrayBufferView",
        "!doc": "<p>Fill this array with the given value, for every index <code>&gt;= start</code> and <code>&lt; end</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_fill"
      },
      "filter": {
        "!type": "fn(function: ?, thisArg: ?) -> ?",
        "!doc": "<p>Return an array which contains only those elements for which the callback function returns &#39;true&#39;</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_filter"
      },
      "find": {
        "!type": "fn(function: ?) -> ?",
        "!doc": "<p>Return the array element where <code>function</code> returns <code>true</code>, or <code>undefined</code> if it doesn&#39;t returns <code>true</code> for any element.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_find"
      },
      "findIndex": {
        "!type": "fn(function: ?) -> ?",
        "!doc": "<p>Return the array element&#39;s index where <code>function</code> returns <code>true</code>, or <code>-1</code> if it doesn&#39;t returns <code>true</code> for any element.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_findIndex"
      },
      "reverse": {
        "!type": "fn() -> +ArrayBufferView",
        "!doc": "<p>Reverse the contents of this <code>ArrayBufferView</code> in-place</p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_reverse"
      },
      "slice": {
        "!type": "fn(start: number, end: ?) -> +Array",
        "!doc": "<p>Return a copy of a portion of this array (in a new array).</p>\n<p> <strong>Note:</strong> This currently returns a normal <code>Array</code>, not an <code>ArrayBuffer</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_ArrayBufferView_slice"
      }
    }
  },
  "Uint8Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Uint8Array_Uint8Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Uint8ClampedArray": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n<p>Clamped arrays clamp their values to the allowed range, rather than &#39;wrapping&#39;. e.g. after <code>a[0]=12345;</code>, <code>a[0]==255</code>.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Uint8ClampedArray_Uint8ClampedArray",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Int8Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Int8Array_Int8Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Uint16Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Uint16Array_Uint16Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Int16Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Int16Array_Int16Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Uint24Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Uint24Array_Uint24Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Uint32Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Uint32Array_Uint32Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Int32Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Int32Array_Int32Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Float32Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Float32Array_Float32Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Float64Array": {
    "!type": "fn(arr: ?, byteOffset: number, length: number) -> +ArrayBufferView",
    "!doc": "<p>Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an <code>ArrayBufferView</code> (eg. <code>Uint8Array</code> rather than <code>ArrayBuffer</code>) is given, it will be completely copied rather than referenced.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Float64Array_Float64Array",
    "prototype": {
      "!proto": "ArrayBufferView.prototype"
    }
  },
  "Object": {
    "!type": "fn(value: ?) -> ?",
    "!doc": "<p>Creates an Object from the supplied argument</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Object_Object",
    "prototype": {
      "!stdProto": "Object",
      "length": {
        "!type": "?",
        "!doc": "<p>Find the length of the object</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Object_length"
      },
      "valueOf": {
        "!type": "fn() -> ?",
        "!doc": "<p>Returns the primitive value of this object.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Object_valueOf"
      },
      "toString": {
        "!type": "fn(radix: ?) -> ?",
        "!doc": "<p>Convert the Object to a string</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Object_toString"
      },
      "clone": {
        "!type": "fn() -> ?",
        "!doc": "<p>Copy this object completely</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Object_clone"
      },
      "hasOwnProperty": {
        "!type": "fn(name: ?) -> bool",
        "!doc": "<p>Return true if the object (not its prototype) has the given property.</p>\n<p>NOTE: This currently returns false-positives for built-in functions in prototypes</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Object_hasOwnProperty"
      },
      "emit": {
        "!type": "fn(event: ?, args: ?)",
        "!doc": "<p>Call any event listeners that were added to this object with <code>Object.on</code>, for instance <code>obj.emit(&#39;data&#39;, &#39;Foo&#39;)</code>.</p>\n<p>For more information see <code>Object.on</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Object_emit"
      }
    },
    "keys": {
      "!type": "fn(object: ?) -> ?",
      "!doc": "<p>Return all enumerable keys of the given object</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_keys"
    },
    "getOwnPropertyNames": {
      "!type": "fn(object: ?) -> ?",
      "!doc": "<p>Returns an array of all properties (enumerable or not) found directly on a given object.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_getOwnPropertyNames"
    },
    "create": {
      "!type": "fn(proto: ?, propertiesObject: ?) -> ?",
      "!doc": "<p>Creates a new object with the specified prototype object and properties. properties are currently unsupported.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_create"
    },
    "getOwnPropertyDescriptor": {
      "!type": "fn(obj: ?, name: ?) -> ?",
      "!doc": "<p>Get information on the given property in the object, or undefined</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_getOwnPropertyDescriptor"
    },
    "defineProperty": {
      "!type": "fn(obj: ?, name: ?, desc: ?) -> ?",
      "!doc": "<p>Add a new property to the Object. &#39;Desc&#39; is an object with the following fields:</p>\n<ul>\n<li><code>configurable</code> (bool = false) - can this property be changed/deleted</li>\n<li><code>enumerable</code> (bool = false) - can this property be enumerated</li>\n<li><code>value</code> (anything) - the value of this property</li>\n<li><code>writable</code> (bool = false) - can the value be changed with the assignment operator?</li>\n<li><code>get</code> (function) - the getter function, or undefined if no getter (only supported on some platforms)</li>\n<li><code>set</code> (function) - the setter function, or undefined if no setter (only supported on some platforms)</li>\n</ul>\n<p><strong>Note:</strong> <code>configurable</code>, <code>enumerable</code>, <code>writable</code>, <code>get</code>, and <code>set</code> are not implemented and will be ignored.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_defineProperty"
    },
    "defineProperties": {
      "!type": "fn(obj: ?, props: ?) -> ?",
      "!doc": "<p>Adds new properties to the Object. See <code>Object.defineProperty</code> for more information</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_defineProperties"
    },
    "getPrototypeOf": {
      "!type": "fn(object: ?) -> ?",
      "!doc": "<p>Get the prototype of the given object - this is like writing <code>object.__proto__</code>\nbut is the &#39;proper&#39; ES6 way of doing it</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_getPrototypeOf"
    },
    "setPrototypeOf": {
      "!type": "fn(object: ?, prototype: ?) -> ?",
      "!doc": "<p>Set the prototype of the given object - this is like writing\n<code>object.__proto__ = prototype</code> but is the &#39;proper&#39; ES6 way of doing it</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_setPrototypeOf"
    },
    "assign": {
      "!type": "fn(args: ?) -> ?",
      "!doc": "<p>Appends all keys and values in any subsequent objects to the first object</p>\n<p><strong>Note:</strong> Unlike the standard ES6 <code>Object.assign</code>, this will throw an exception\nif given raw strings, bools or numbers rather than objects.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Object_assign"
    }
  },
  "Function": {
    "!type": "fn(args: ?) -> ?",
    "!doc": "<p>Creates a function</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Function_Function",
    "prototype": {
      "!stdProto": "Function",
      "replaceWith": {
        "!type": "fn(newFunc: ?)",
        "!doc": "<p>This replaces the function with the one in the argument - while keeping the old function&#39;s scope.\nThis allows inner functions to be edited, and is used when edit() is called on an inner function.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Function_replaceWith"
      },
      "call": {
        "!type": "fn(this: ?, params: ?) -> ?",
        "!doc": "<p>This executes the function with the supplied &#39;this&#39; argument and parameters</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Function_call"
      },
      "apply": {
        "!type": "fn(this: ?, args: ?) -> ?",
        "!doc": "<p>This executes the function with the supplied &#39;this&#39; argument and parameters</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Function_apply"
      },
      "bind": {
        "!type": "fn(this: ?, params: ?) -> ?",
        "!doc": "<p>This executes the function with the supplied &#39;this&#39; argument and parameters</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Function_bind"
      }
    }
  },
  "Serial": {
    "!type": "fn() -> ?",
    "!doc": "<p>Create a software Serial port. This has limited functionality (only low baud rates), but it can work on any pins.</p>\n<p>Use <code>Serial.setup</code> to configure this port.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Serial_Serial",
    "find": {
      "!type": "fn(pin: +Pin) -> ?",
      "!doc": "<p>Try and find a USART (Serial) hardware device that will work on this pin (eg. <code>Serial1</code>)</p>\n<p>May return undefined if no device can be found.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Serial_find"
    },
    "prototype": {
      "setConsole": {
        "!type": "fn(force: bool)",
        "!doc": "<p>Set this Serial port as the port for the JavaScript console (REPL).</p>\n<p>Unless <code>force</code> is set to true, changes in the connection state of the board\n(for instance plugging in USB) will cause the console to change.</p>\n<p>See <code>E.setConsole</code> for a more flexible version of this function.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_setConsole"
      },
      "unsetup": {
        "!type": "fn()",
        "!doc": "<p>If the serial (or software serial) device was set up,\nuninitialise it.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_unsetup"
      },
      "print": {
        "!type": "fn(string: ?)",
        "!doc": "<p>Print a string to the serial port - without a line feed</p>\n<p> <strong>Note:</strong> This function replaces any occurances of <code>\\n</code> in the string with <code>\\r\\n</code>. To avoid this, use <code>Serial.write</code>.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_print"
      },
      "println": {
        "!type": "fn(string: ?)",
        "!doc": "<p>Print a line to the serial port with a newline (<code>\\r\\n</code>) at the end of it.</p>\n<p> <strong>Note:</strong> This function converts data to a string first, eg <code>Serial.print([1,2,3])</code> is equivalent to <code>Serial.print(&quot;1,2,3&quot;). If you&#39;d like to write raw bytes, use</code>Serial.write`.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_println"
      },
      "write": {
        "!type": "fn(data: ?)",
        "!doc": "<p>Write a character or array of data to the serial port</p>\n<p>This method writes unmodified data, eg <code>Serial.write([1,2,3])</code> is equivalent to <code>Serial.write(&quot;\\1\\2\\3&quot;)</code>. If you&#39;d like data converted to a string first, use <code>Serial.print</code>.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_write"
      },
      "available": {
        "!type": "fn() -> number",
        "!doc": "<p>Return how many bytes are available to read. If there is already a listener for data, this will always return 0.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_available"
      },
      "read": {
        "!type": "fn(chars: number) -> ?",
        "!doc": "<p>Return a string containing characters that have been received</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_read"
      },
      "pipe": {
        "!type": "fn(destination: ?, options: ?)",
        "!doc": "<p>Pipe this USART to a stream (an object with a &#39;write&#39; method)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Serial_pipe"
      }
    }
  },
  "USB": {
    "!type": "+Serial",
    "!doc": "<p>The USB Serial port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_USB"
  },
  "Serial1": {
    "!type": "+Serial",
    "!doc": "<p>The first Serial (USART) port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Serial1"
  },
  "Serial2": {
    "!type": "+Serial",
    "!doc": "<p>The second Serial (USART) port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Serial2"
  },
  "Serial3": {
    "!type": "+Serial",
    "!doc": "<p>The third Serial (USART) port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Serial3"
  },
  "Serial4": {
    "!type": "+Serial",
    "!doc": "<p>The fourth Serial (USART) port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Serial4"
  },
  "Serial5": {
    "!type": "+Serial",
    "!doc": "<p>The fifth Serial (USART) port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Serial5"
  },
  "Serial6": {
    "!type": "+Serial",
    "!doc": "<p>The sixth Serial (USART) port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Serial6"
  },
  "LoopbackA": {
    "!type": "+Serial",
    "!doc": "<p>A loopback serial device. Data sent to <code>LoopbackA</code> comes out of <code>LoopbackB</code> and vice versa</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_LoopbackA"
  },
  "LoopbackB": {
    "!type": "+Serial",
    "!doc": "<p>A loopback serial device. Data sent to <code>LoopbackA</code> comes out of <code>LoopbackB</code> and vice versa</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_LoopbackB"
  },
  "Telnet": {
    "!doc": "<p>A telnet serial device that maps to the built-in telnet console server (devices that have built-in wifi only).</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Telnet"
  },
  "Date": {
    "!type": "fn(args: ?) -> +Date",
    "!doc": "<p>Creates a date object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Date_Date",
    "now": {
      "!type": "fn() -> number",
      "!doc": "<p>Get the number of milliseconds elapsed since 1970 (or on embedded platforms, since startup)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Date_now"
    },
    "prototype": {
      "getTimezoneOffset": {
        "!type": "fn() -> number",
        "!doc": "<p>This returns Espruino&#39;s time-zone offset from UTC, in minutes.</p>\n<p>This is set with <code>E.setTimeZone</code> and is System-wide. The value returned\nhas nothing to do with the instance of <code>Date</code> that it is called on.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getTimezoneOffset"
      },
      "getTime": {
        "!type": "fn() -> number",
        "!doc": "<p>Return the number of milliseconds since 1970</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getTime"
      },
      "valueOf": {
        "!type": "fn() -> number",
        "!doc": "<p>Return the number of milliseconds since 1970</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_valueOf"
      },
      "setTime": {
        "!type": "fn(timeValue: number) -> number",
        "!doc": "<p>Set the time/date of this Date class</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_setTime"
      },
      "getHours": {
        "!type": "fn() -> number",
        "!doc": "<p>0..23</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getHours"
      },
      "getMinutes": {
        "!type": "fn() -> number",
        "!doc": "<p>0..59</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getMinutes"
      },
      "getSeconds": {
        "!type": "fn() -> number",
        "!doc": "<p>0..59</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getSeconds"
      },
      "getMilliseconds": {
        "!type": "fn() -> number",
        "!doc": "<p>0..999</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getMilliseconds"
      },
      "getDay": {
        "!type": "fn() -> number",
        "!doc": "<p>Day of the week (0=sunday, 1=monday, etc)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getDay"
      },
      "getDate": {
        "!type": "fn() -> number",
        "!doc": "<p>Day of the month 1..31</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getDate"
      },
      "getMonth": {
        "!type": "fn() -> number",
        "!doc": "<p>Month of the year 0..11</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getMonth"
      },
      "getFullYear": {
        "!type": "fn() -> number",
        "!doc": "<p>The year, eg. 2014</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_getFullYear"
      },
      "setHours": {
        "!type": "fn(hoursValue: number, minutesValue: ?, secondsValue: ?, millisecondsValue: ?) -> number",
        "!doc": "<p>0..23</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_setHours"
      },
      "setMinutes": {
        "!type": "fn(minutesValue: number, secondsValue: ?, millisecondsValue: ?) -> number",
        "!doc": "<p>0..59</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_setMinutes"
      },
      "setSeconds": {
        "!type": "fn(secondsValue: number, millisecondsValue: ?) -> number",
        "!doc": "<p>0..59</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_setSeconds"
      },
      "setMilliseconds": {
        "!type": "fn(millisecondsValue: number) -> number",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_Date_setMilliseconds"
      },
      "setDate": {
        "!type": "fn(dayValue: number) -> number",
        "!doc": "<p>Day of the month 1..31</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_setDate"
      },
      "setMonth": {
        "!type": "fn(yearValue: number, dayValue: ?) -> number",
        "!doc": "<p>Month of the year 0..11</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_setMonth"
      },
      "setFullYear": {
        "!type": "fn(yearValue: number, yearValue: ?, dayValue: ?) -> number",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_Date_setFullYear"
      },
      "toString": {
        "!type": "fn() -> ?",
        "!doc": "<p>Converts to a String, eg: <code>Fri Jun 20 2014 14:52:20 GMT+0000</code></p>\n<p> <strong>Note:</strong> This uses whatever timezone was set with <code>E.setTimeZone()</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_toString"
      },
      "toUTCString": {
        "!type": "fn() -> ?",
        "!doc": "<p>Converts to a String, eg: <code>Fri, 20 Jun 2014 14:52:20 GMT</code></p>\n<p> <strong>Note:</strong> This always assumes a timezone of GMT</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_toUTCString"
      },
      "toISOString": {
        "!type": "fn() -> ?",
        "!doc": "<p>Converts to a ISO 8601 String, eg: <code>2014-06-20T14:52:20.123Z</code></p>\n<p> <strong>Note:</strong> This always assumes a timezone of GMT</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_toISOString"
      },
      "toJSON": {
        "!type": "fn() -> ?",
        "!doc": "<p>Calls <code>Date.toISOString</code> to output this date to JSON</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Date_toJSON"
      }
    },
    "parse": {
      "!type": "fn(str: ?) -> number",
      "!doc": "<p>Parse a date string and return milliseconds since 1970. Data can be either &#39;2011-10-20T14:48:00&#39;, &#39;2011-10-20&#39; or &#39;Mon, 25 Dec 1995 13:30:00 +0430&#39;</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Date_parse"
    }
  },
  "Flash": {
    "!type": "fn()",
    "!doc": "<p>This module allows you to read and write the nonvolatile flash memory of your device.</p>\n<p>Also see the <code>Storage</code> library, which provides a safer file-like\ninterface to nonvolatile storage.</p>\n<p>It should be used with extreme caution, as it is easy to overwrite parts of Flash\nmemory belonging to Espruino or even its bootloader. If you damage the bootloader\nthen you may need external hardware such as a USB-TTL converter to restore it. For\nmore information on restoring the bootloader see <code>Advanced Reflashing</code> in your\nboard&#39;s reference pages.</p>\n<p>To see which areas of memory you can and can&#39;t overwrite, look at the values\nreported by <code>process.memory()</code>.</p>\n<p><strong>Note:</strong> On Nordic platforms there are checks in place to help you avoid\n&#39;bricking&#39; your device be damaging the bootloader. You can disable these with <code>E.setFlags({unsafeFlash:1})</code></p>\n",
    "!url": "http://www.espruino.com/Reference#l_Flash_undefined",
    "getPage": {
      "!type": "fn(addr: number) -> ?",
      "!doc": "<p>Returns the start and length of the flash page containing the given address.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Flash_getPage"
    },
    "getFree": {
      "!type": "fn() -> ?",
      "!doc": "<p>This method returns an array of objects of the form <code>{addr : #, length : #}</code>, representing\ncontiguous areas of flash memory in the chip that are not used for anything.</p>\n<p>The memory areas returned are on page boundaries. This means that you can\nsafely erase the page containing any address here, and you won&#39;t risk\ndeleting part of the Espruino firmware.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Flash_getFree"
    },
    "erasePage": {
      "!type": "fn(addr: ?)",
      "!doc": "<p>Erase a page of flash memory</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Flash_erasePage"
    },
    "write": {
      "!type": "fn(data: ?, addr: number)",
      "!doc": "<p>Write data into memory at the given address</p>\n<p>In flash memory you may only turn bits that are 1 into bits that are 0. If\nyou&#39;re writing data into an area that you have already written (so <code>read</code>\ndoesn&#39;t return all <code>0xFF</code>) you&#39;ll need to call <code>erasePage</code> to clear the\nentire page.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Flash_write"
    },
    "read": {
      "!type": "fn(length: number, addr: number) -> ?",
      "!doc": "<p>Read flash memory from the given address</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Flash_read"
    }
  },
  "Storage": {
    "!type": "fn()",
    "!doc": "<p>This module allows you to read and write part of the nonvolatile flash\nmemory of your device using a filesystem-like API.</p>\n<p>Also see the <code>Flash</code> library, which provides a low level, more dangerous way\nto access all parts of your flash memory.</p>\n<p>The <code>Storage</code> library provides two distinct types of file:</p>\n<ul>\n<li><code>require(&quot;Storage&quot;).write(...)</code>/<code>require(&quot;Storage&quot;).read(...)</code>/etc create simple\ncontiguous files of fixed length. This is the recommended file type.</li>\n<li><code>require(&quot;Storage&quot;).open(...)</code> creates a <code>StorageFile</code>, which stores the file in\nnumbered chunks (<code>&quot;filename\\1&quot;</code>/<code>&quot;filename\\2&quot;</code>/etc). It allows data to be appended\nand for the file to be read line by line.</li>\n</ul>\n<p>You must read a file using the same method you used to write it - eg. you can&#39;t create a\nfile with <code>require(&quot;Storage&quot;).open(...)</code> and then read it with <code>require(&quot;Storage&quot;).read(...)</code>.</p>\n<p><strong>Note:</strong> In firmware 2v05 and later, the maximum length for filenames\nis 28 characters. However in 2v04 and earlier the max length is 8.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Storage_undefined",
    "eraseAll": {
      "!type": "fn()",
      "!doc": "<p>Erase the flash storage area. This will remove all files\ncreated with <code>require(&quot;Storage&quot;).write(...)</code> as well\nas any code saved with <code>save()</code> or <code>E.setBootCode()</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_eraseAll"
    },
    "erase": {
      "!type": "fn(name: ?)",
      "!doc": "<p>Erase a single file from the flash storage area.</p>\n<p><strong>Note:</strong> This function should be used with normal files, and not\n<code>StorageFile</code>s created with <code>require(&quot;Storage&quot;).open(filename, ...)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_erase"
    },
    "read": {
      "!type": "fn(name: ?, offset: number, length: number) -> ?",
      "!doc": "<p>Read a file from the flash storage area that has\nbeen written with <code>require(&quot;Storage&quot;).write(...)</code>.</p>\n<p>This function returns a memory-mapped String that points to the actual\nmemory area in read-only memory, so it won&#39;t use up RAM.</p>\n<p>As such you can check if a file exists efficiently using <code>require(&quot;Storage&quot;).read(filename)!==undefined</code>.</p>\n<p>If you evaluate this string with <code>eval</code>, any functions\ncontained in the String will keep their code stored\nin flash memory.</p>\n<p><strong>Note:</strong> This function should be used with normal files, and not\n<code>StorageFile</code>s created with <code>require(&quot;Storage&quot;).open(filename, ...)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_read"
    },
    "readJSON": {
      "!type": "fn(name: ?, noExceptions: bool) -> ?",
      "!doc": "<p>Read a file from the flash storage area that has\nbeen written with <code>require(&quot;Storage&quot;).write(...)</code>,\nand parse JSON in it into a JavaScript object.</p>\n<p>This is identical to <code>JSON.parse(require(&quot;Storage&quot;).read(...))</code>.\nIt will throw an exception if the data in the file is not\nvalid JSON.</p>\n<p><strong>Note:</strong> This function should be used with normal files, and not\n<code>StorageFile</code>s created with <code>require(&quot;Storage&quot;).open(filename, ...)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_readJSON"
    },
    "readArrayBuffer": {
      "!type": "fn(name: ?) -> ?",
      "!doc": "<p>Read a file from the flash storage area that has\nbeen written with <code>require(&quot;Storage&quot;).write(...)</code>,\nand return the raw binary data as an ArrayBuffer.</p>\n<p>This can be used:</p>\n<ul>\n<li>In a <code>DataView</code> with <code>new DataView(require(&quot;Storage&quot;).readArrayBuffer(&quot;x&quot;))</code></li>\n<li>In a <code>Uint8Array/Float32Array/etc</code> with <code>new Uint8Array(require(&quot;Storage&quot;).readArrayBuffer(&quot;x&quot;))</code></li>\n</ul>\n<p><strong>Note:</strong> This function should be used with normal files, and not\n<code>StorageFile</code>s created with <code>require(&quot;Storage&quot;).open(filename, ...)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_readArrayBuffer"
    },
    "writeJSON": {
      "!type": "fn(name: ?, data: ?) -> bool",
      "!doc": "<p>Write/create a file in the flash storage area. This is\nnonvolatile and will not disappear when the device resets\nor power is lost.</p>\n<p>Simply write <code>require(&quot;Storage&quot;).writeJSON(&quot;MyFile&quot;, [1,2,3])</code> to write\na new file, and <code>require(&quot;Storage&quot;).readJSON(&quot;MyFile&quot;)</code> to read it.</p>\n<p>This is equivalent to: <code>require(&quot;Storage&quot;).write(name, JSON.stringify(data))</code></p>\n<p><strong>Note:</strong> This function should be used with normal files, and not\n<code>StorageFile</code>s created with <code>require(&quot;Storage&quot;).open(filename, ...)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_writeJSON"
    },
    "list": {
      "!type": "fn(regex: ?) -> ?",
      "!doc": "<p>List all files in the flash storage area. An array of Strings is returned.</p>\n<p>This currently also lists files created by <code>StorageFile</code> (<code>require(&quot;Storage&quot;).open</code>)\nwhich have a file number (<code>&quot;\\1&quot;</code>/<code>&quot;\\2&quot;</code>/etc) appended to them.</p>\n<p><strong>Note:</strong> This will output system files (eg. saved code) as well as\nfiles that you may have written.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_list"
    },
    "compact": {
      "!type": "fn()",
      "!doc": "<p>The Flash Storage system is journaling. To make the most of the limited\nwrite cycles of Flash memory, Espruino marks deleted/replaced files as\ngarbage and moves on to a fresh part of flash memory. Espruino only\nfully erases those files when it is running low on flash, or when\n<code>compact</code> is called.</p>\n<p><code>compact</code> may fail if there isn&#39;t enough RAM free on the stack to\nuse as swap space, however in this case it will not lose data.</p>\n<p><strong>Note:</strong> <code>compact</code> rearranges the contents of memory. If code is\nreferencing that memory (eg. functions that have their code stored in flash)\nthen they may become garbled when compaction happens. To avoid this,\ncall <code>eraseFiles</code> before uploading data that you intend to reference to\nensure that uploaded files are right at the start of flash and cannot be\ncompacted further.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_compact"
    },
    "debug": {
      "!type": "fn()",
      "!doc": "<p>This writes information about all blocks in flash\nmemory to the console - and is only useful for debugging\nflash storage.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_debug"
    },
    "getFree": {
      "!type": "fn() -> number",
      "!doc": "<p>Return the amount of free bytes available in\nStorage. Due to fragmentation there may be more\nbytes available, but this represents the maximum\nsize of file that can be written.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_getFree"
    },
    "open": {
      "!type": "fn(name: ?, mode: ?) -> +StorageFile",
      "!doc": "<p>Open a file in the Storage area. This can be used for appending data\n(normal read/write operations only write the entire file).</p>\n<p>Please see <code>StorageFile</code> for more information (and examples).</p>\n<p><strong>Note:</strong> These files write through immediately - they do not need closing.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Storage_open"
    }
  },
  "E": {
    "!type": "fn()",
    "!doc": "<p>This is the built-in JavaScript class for Espruino utility functions.</p>\n",
    "!url": "http://www.espruino.com/Reference#E",
    "getTemperature": {
      "!type": "fn() -> number",
      "!doc": "<p>Use the microcontroller&#39;s internal thermistor to work out the temperature.</p>\n<p>On Puck.js v2.0 this will use the on-board PCT2075TP temperature sensor, but on other devices it may not be desperately well calibrated.</p>\n<p>While this is implemented on Espruino boards, it may not be implemented on other devices. If so it&#39;ll return NaN.</p>\n<p> <strong>Note:</strong> This is not entirely accurate and varies by a few degrees from chip to chip. It measures the <strong>die temperature</strong>, so when connected to USB it could be reading 10 over degrees C above ambient temperature. When running from battery with <code>setDeepSleep(true)</code> it is much more accurate though.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getTemperature"
    },
    "getAnalogVRef": {
      "!type": "fn() -> number",
      "!doc": "<p>Check the internal voltage reference. To work out an actual voltage of an input pin, you can use <code>analogRead(pin)*E.getAnalogVRef()</code></p>\n<p> <strong>Note:</strong> This value is calculated by reading the voltage on an internal voltage reference with the ADC.\nIt will be slightly noisy, so if you need this for accurate measurements we&#39;d recommend that you call\nthis function several times and average the results.</p>\n<p>While this is implemented on Espruino boards, it may not be implemented on other devices. If so it&#39;ll return NaN.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getAnalogVRef"
    },
    "nativeCall": {
      "!type": "fn(addr: number, sig: ?, data: ?) -> ?",
      "!doc": "<p>ADVANCED: This is a great way to crash Espruino if you&#39;re not sure what you are doing</p>\n<p>Create a native function that executes the code at the given address. Eg. <code>E.nativeCall(0x08012345,&#39;double (double,double)&#39;)(1.1, 2.2)</code></p>\n<p>If you&#39;re executing a thumb function, you&#39;ll almost certainly need to set the bottom bit of the address to 1.</p>\n<p>Note it&#39;s not guaranteed that the call signature you provide can be used - there are limits on the number of arguments allowed.</p>\n<p>When supplying <code>data</code>, if it is a &#39;flat string&#39; then it will be used directly, otherwise it&#39;ll be converted to a flat string and used.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_nativeCall"
    },
    "clip": {
      "!type": "fn(x: number, min: number, max: number) -> number",
      "!doc": "<p>Clip a number to be between min and max (inclusive)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_clip"
    },
    "sum": {
      "!type": "fn(arr: ?) -> number",
      "!doc": "<p>Sum the contents of the given Array, String or ArrayBuffer and return the result</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_sum"
    },
    "variance": {
      "!type": "fn(arr: ?, mean: number) -> number",
      "!doc": "<p>Work out the variance of the contents of the given Array, String or ArrayBuffer and return the result. This is equivalent to <code>v=0;for (i in arr) v+=Math.pow(mean-arr[i],2)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_variance"
    },
    "convolve": {
      "!type": "fn(arr1: ?, arr2: ?, offset: number) -> number",
      "!doc": "<p>Convolve arr1 with arr2. This is equivalent to <code>v=0;for (i in arr1) v+=arr1[i] * arr2[(i+offset) % arr2.length]</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_convolve"
    },
    "FFT": {
      "!type": "fn(arrReal: ?, arrImage: ?, inverse: bool)",
      "!doc": "<p>Performs a Fast Fourier Transform (FFT) in 32 bit floats on the supplied data and writes it back into the\noriginal arrays. Note that if only one array is supplied, the data written back is the modulus of the complex\nresult <code>sqrt(r*r+i*i)</code>.</p>\n<p>In order to perform the FFT, there has to be enough room on the stack to allocate two arrays of 32 bit\nfloating point numbers - this will limit the maximum size of FFT possible to around 1024 items on\nmost platforms.</p>\n<p><strong>Note:</strong> on the Original Espruino board, FFTs are performed in 64bit arithmetic as there isn&#39;t\nspace to include the 32 bit maths routines (2x more RAM is required).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_FFT"
    },
    "kickWatchdog": {
      "!type": "fn()",
      "!doc": "<p>Kicks a Watchdog timer set up with <code>E.enableWatchdog(..., false)</code>. See\n<code>E.enableWatchdog</code> for more information.</p>\n<p><strong>NOTE:</strong> This is only implemented on STM32 and nRF5x devices (all official Espruino boards).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_kickWatchdog"
    },
    "getErrorFlags": {
      "!type": "fn() -> ?",
      "!doc": "<p>Get and reset the error flags. Returns an array that can contain:</p>\n<p><code>&#39;FIFO_FULL&#39;</code>: The receive FIFO filled up and data was lost. This could be state transitions for setWatch, or received characters.</p>\n<p><code>&#39;BUFFER_FULL&#39;</code>: A buffer for a stream filled up and characters were lost. This can happen to any stream - Serial,HTTP,etc.</p>\n<p><code>&#39;CALLBACK&#39;</code>: A callback (<code>setWatch</code>, <code>setInterval</code>, <code>on(&#39;data&#39;,...)</code>) caused an error and so was removed.</p>\n<p><code>&#39;LOW_MEMORY&#39;</code>: Memory is running low - Espruino had to run a garbage collection pass or remove some of the command history</p>\n<p><code>&#39;MEMORY&#39;</code>: Espruino ran out of memory and was unable to allocate some data that it needed.</p>\n<p><code>&#39;UART_OVERFLOW&#39;</code> : A UART received data but it was not read in time and was lost</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getErrorFlags"
    },
    "getFlags": {
      "!type": "fn() -> ?",
      "!doc": "<p>Get Espruino&#39;s interpreter flags that control the way it handles your JavaScript code.</p>\n<ul>\n<li><code>deepSleep</code> - Allow deep sleep modes (also set by setDeepSleep)</li>\n<li><code>pretokenise</code> - When adding functions, pre-minify them and tokenise reserved words</li>\n<li><code>unsafeFlash</code> - Some platforms stop writes/erases to interpreter memory to stop you bricking the device accidentally - this removes that protection</li>\n<li><code>unsyncFiles</code> - When writing files, <em>don&#39;t</em> flush all data to the SD card after each command (the default is <em>to</em> flush). This is much faster, but can cause filesystem damage if power is lost without the filesystem unmounted.</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getFlags"
    },
    "setFlags": {
      "!type": "fn(flags: ?)",
      "!doc": "<p>Set the Espruino interpreter flags that control the way it handles your JavaScript code.</p>\n<p>Run <code>E.getFlags()</code> and check its description for a list of available flags and their values.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_setFlags"
    },
    "pipe": {
      "!type": "fn(source: ?, destination: ?, options: ?)",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_E_pipe"
    },
    "toArrayBuffer": {
      "!type": "fn(str: ?) -> +ArrayBufferView",
      "!doc": "<p>Create an ArrayBuffer from the given string. This is done via a reference, not a copy - so it is very fast and memory efficient.</p>\n<p>Note that this is an ArrayBuffer, not a Uint8Array. To get one of those, do: <code>new Uint8Array(E.toArrayBuffer(&#39;....&#39;))</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_toArrayBuffer"
    },
    "toString": {
      "!type": "fn(args: ?) -> +String",
      "!doc": "<p>Returns a &#39;flat&#39; string representing the data in the arguments, or return <code>undefined</code>\nif a flat string cannot be created.</p>\n<p>This creates a string from the given arguments. If an argument is a String or an Array,\neach element is traversed and added as an 8 bit character. If it is anything else, it is\nconverted to a character directly.</p>\n<p>In the case where there&#39;s one argument which is an 8 bit typed array backed by a\nflat string of the same length, the backing string will be returned without doing\na copy or other allocation. The same applies if there&#39;s a single argument which\nis itself a flat string.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_toString"
    },
    "toJS": {
      "!type": "fn(arg: ?) -> +String",
      "!doc": "<p>This performs the same basic function as <code>JSON.stringify</code>,\nhowever <code>JSON.stringify</code> adds extra characters to conform\nto the JSON spec which aren&#39;t required if outputting JS.</p>\n<p><code>E.toJS</code> will also stringify JS functions, whereas\n<code>JSON.stringify</code> ignores them.</p>\n<p>For example:</p>\n<ul>\n<li><code>JSON.stringify({a:1,b:2}) == &#39;{&quot;a&quot;:1,&quot;b&quot;:2}&#39;</code></li>\n<li><code>E.toJS({a:1,b:2}) == &#39;{a:1,b:2}&#39;</code></li>\n</ul>\n<p><strong>Note:</strong> Strings generated with <code>E.toJS</code> can&#39;t be\nreliably parsed by <code>JSON.parse</code> - however they are\nvalid JS so will work with <code>eval</code> (but this has security\nimplications if you don&#39;t trust the source of the string).</p>\n<p>On the desktop <a href=\"https://github.com/json5/json5\">JSON5 parsers</a>\nwill parse the strings produced by <code>E.toJS</code> without trouble.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_toJS"
    },
    "memoryArea": {
      "!type": "fn(addr: number, len: number) -> +String",
      "!doc": "<p>This creates and returns a special type of string, which actually references\na specific memory address. It can be used in order to use sections of\nFlash memory directly in Espruino (for example to execute code straight\nfrom flash memory with <code>eval(E.memoryArea( ... ))</code>)</p>\n<p><strong>Note:</strong> This is only tested on STM32-based platforms (Espruino Original\nand Espruino Pico) at the moment.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_memoryArea"
    },
    "setBootCode": {
      "!type": "fn(code: ?, alwaysExec: bool)",
      "!doc": "<p>This writes JavaScript code into Espruino&#39;s flash memory, to be executed on\nstartup. It differs from <code>save()</code> in that <code>save()</code> saves the whole state of\nthe interpreter, whereas this just saves JS code that is executed at boot.</p>\n<p>Code will be executed before <code>onInit()</code> and <code>E.on(&#39;init&#39;, ...)</code>.</p>\n<p>If <code>alwaysExec</code> is <code>true</code>, the code will be executed even after a call to\n<code>reset()</code>. This is useful if you&#39;re making something that you want to\nprogram, but you want some code that is always built in (for instance\nsetting up a display or keyboard).</p>\n<p>To remove boot code that has been saved previously, use <code>E.setBootCode(&quot;&quot;)</code></p>\n<p><strong>Note:</strong> this removes any code that was previously saved with <code>save()</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_setBootCode"
    },
    "setClock": {
      "!type": "fn(options: ?) -> number",
      "!doc": "<p>This sets the clock frequency of Espruino&#39;s processor. It will return <code>0</code> if\nit is unimplemented or the clock speed cannot be changed.</p>\n<p><strong>Note:</strong> On pretty much all boards, UART, SPI, I2C, PWM, etc will change\nfrequency and will need setting up again in order to work.</p>\n<h3 id=\"stm32f4\">STM32F4</h3>\n<p>Options is of the form <code>{ M: int, N: int, P: int, Q: int }</code> - see the &#39;Clocks&#39;\nsection of the microcontroller&#39;s reference manual for what these mean.</p>\n<ul>\n<li>System clock = 8Mhz <em> N / ( M </em> P )</li>\n<li>USB clock (should be 48Mhz) = 8Mhz <em> N / ( M </em> Q )</li>\n</ul>\n<p>Optional arguments are:</p>\n<ul>\n<li><code>latency</code> - flash latency from 0..15</li>\n<li><code>PCLK1</code> - Peripheral clock 1 divisor (default: 2)</li>\n<li><code>PCLK2</code> - Peripheral clock 2 divisor (default: 4)</li>\n</ul>\n<p>The Pico&#39;s default is <code>{M:8, N:336, P:4, Q:7, PCLK1:2, PCLK2:4}</code>, use\n<code>{M:8, N:336, P:8, Q:7, PCLK:1, PCLK2:2}</code> to halve the system clock speed\nwhile keeping the peripherals running at the same speed (omitting PCLK1/2\nwill lead to the peripherals changing speed too).</p>\n<p>On STM32F4 boards (eg. Espruino Pico), the USB clock needs to be kept at 48Mhz\nor USB will fail to work. You&#39;ll also experience USB instability if the processor\nclock falls much below 48Mhz.</p>\n<h3 id=\"esp8266\">ESP8266</h3>\n<p>Just specify an integer value, either 80 or 160 (for 80 or 160Mhz)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_setClock"
    },
    "getConsole": {
      "!type": "fn() -> ?",
      "!doc": "<p>Returns the current console device - see <code>E.setConsole</code> for more information.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getConsole"
    },
    "reverseByte": {
      "!type": "fn(x: number) -> number",
      "!doc": "<p>Reverse the 8 bits in a byte, swapping MSB and LSB.</p>\n<p>For example, <code>E.reverseByte(0b10010000) == 0b00001001</code>.</p>\n<p>Note that you can reverse all the bytes in an array with: <code>arr = arr.map(E.reverseByte)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_reverseByte"
    },
    "dumpTimers": {
      "!type": "fn()",
      "!doc": "<p>Output the current list of Utility Timer Tasks - for debugging only</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_dumpTimers"
    },
    "dumpLockedVars": {
      "!type": "fn()",
      "!doc": "<p>Dump any locked variables that aren&#39;t referenced from <code>global</code> - for debugging memory leaks only.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_dumpLockedVars"
    },
    "dumpFreeList": {
      "!type": "fn()",
      "!doc": "<p>Dump any locked variables that aren&#39;t referenced from <code>global</code> - for debugging memory leaks only.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_dumpFreeList"
    },
    "dumpFragmentation": {
      "!type": "fn()",
      "!doc": "<p>Show fragmentation.</p>\n<ul>\n<li><code></code> is free space</li>\n<li><code>#</code> is a normal variable</li>\n<li><code>L</code> is a locked variable (address used, cannopt be moved)</li>\n<li><code>=</code> represents data in a Flat String (must be contiguous)</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_E_dumpFragmentation"
    },
    "dumpVariables": {
      "!type": "fn()",
      "!doc": "<p>Dumps a comma-separated list of all allocated variables\nalong with the variables they link to. Can be used\nto visualise where memory is used.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_dumpVariables"
    },
    "defrag": {
      "!type": "fn()",
      "!doc": "<p>BETA: defragment memory!</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_defrag"
    },
    "getAddressOf": {
      "!type": "fn(v: ?, flatAddress: bool) -> number",
      "!doc": "<p>Return the address in memory of the given variable. This can then\nbe used with <code>peek</code> and <code>poke</code> functions. However, changing data in\nJS variables directly (flatAddress=false) will most likely result in a crash.</p>\n<p>This functions exists to allow embedded targets to set up\nperipherals such as DMA so that they write directly to\nJS variables.</p>\n<p>See <a href=\"http://www.espruino.com/Internals\">http://www.espruino.com/Internals</a> for more information</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getAddressOf"
    },
    "lookupNoCase": {
      "!type": "fn(haystack: ?, needle: ?, returnKey: bool) -> ?",
      "!doc": "<p>Search in an Object, Array, or Function</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_lookupNoCase"
    },
    "dumpStr": {
      "!type": "fn() -> +String",
      "!doc": "<p>Get the current interpreter state in a text form such that it can be copied to a new device</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_dumpStr"
    },
    "srand": {
      "!type": "fn(v: number)",
      "!doc": "<p>Set the seed for the random number generator used by <code>Math.random()</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_srand"
    },
    "hwRand": {
      "!type": "fn() -> number",
      "!doc": "<p>Unlike &#39;Math.random()&#39; which uses a pseudo-random number generator, this\nmethod reads from the internal voltage reference several times, xoring and\nrotating to try and make a relatively random value from the noise in the\nsignal.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_hwRand"
    },
    "CRC32": {
      "!type": "fn(data: ?) -> ?",
      "!doc": "<p>Perform a standard 32 bit CRC (Cyclic redundancy check) on the supplied data (one byte at a time)\nand return the result as an unsigned integer.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_CRC32"
    },
    "HSBtoRGB": {
      "!type": "fn(hue: number, sat: number, bri: number, asArray: bool) -> ?",
      "!doc": "<p>Convert hue, saturation and brightness to red, green and blue (packed into an integer if <code>asArray==false</code> or an array if <code>asArray==true</code>).</p>\n<p>This replaces <code>Graphics.setColorHSB</code> and <code>Graphics.setBgColorHSB</code>. On devices with 24 bit colour it can\nbe used as: <code>Graphics.setColor(E.HSBtoRGB(h, s, b))</code></p>\n<p>You can quickly set RGB items in an Array or Typed Array using <code>array.set(E.HSBtoRGB(h, s, b,true), offset)</code>,\nwhich can be useful with arrays used with <code>require(&quot;neopixel&quot;).write</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_HSBtoRGB"
    },
    "setPassword": {
      "!type": "fn(password: ?)",
      "!doc": "<p>Set a password on the console (REPL). When powered on, Espruino will\nthen demand a password before the console can be used. If you want to\nlock the console immediately after this you can call <code>E.lockConsole()</code></p>\n<p>To remove the password, call this function with no arguments.</p>\n<p><strong>Note:</strong> There is no protection against multiple password attempts, so someone\ncould conceivably try every password in a dictionary.</p>\n<p><strong>Note:</strong> This password is stored in memory in plain text. If someone is able\nto execute arbitrary JavaScript code on the device (eg, you use <code>eval</code> on input\nfrom unknown sources) or read the device&#39;s firmware then they may be able to\nobtain it.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_setPassword"
    },
    "lockConsole": {
      "!type": "fn()",
      "!doc": "<p>If a password has been set with <code>E.setPassword()</code>, this will lock the console\nso the password needs to be entered to unlock it.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_lockConsole"
    },
    "setTimeZone": {
      "!type": "fn(zone: number)",
      "!doc": "<p>Set the time zone to be used with <code>Date</code> objects.</p>\n<p>For example <code>E.setTimeZone(1)</code> will be GMT+0100</p>\n<p>Time can be set with <code>setTime</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_setTimeZone"
    },
    "asm": {
      "!type": "fn(callspec: ?, assemblycode: ?)",
      "!doc": "<p>Provide assembly to Espruino.</p>\n<p><strong>This function is not part of Espruino</strong>. Instead, it is detected\nby the Espruino IDE (or command-line tools) at upload time and is\nreplaced with machine code and an <code>E.nativeCall</code> call.</p>\n<p>See <a href=\"http://www.espruino.com/Assembler\">the documentation on the Assembler</a> for more information.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_asm"
    },
    "compiledC": {
      "!type": "fn(code: ?)",
      "!doc": "<p>Provides the ability to write C code inside your JavaScript file.</p>\n<p><strong>This function is not part of Espruino</strong>. Instead, it is detected\nby the Espruino IDE (or command-line tools) at upload time, is sent\nto our web service to be compiled, and is replaced with machine code\nand an <code>E.nativeCall</code> call.</p>\n<p>See <a href=\"http://www.espruino.com/InlineC\">the documentation on Inline C</a> for more information and examples.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_compiledC"
    },
    "reboot": {
      "!type": "fn()",
      "!doc": "<p>Forces a hard reboot of the microcontroller - as close as possible\nto if the reset pin had been toggled.</p>\n<p><strong>Note:</strong> This is different to <code>reset()</code>, which performs a software\nreset of Espruino (resetting the interpreter and pin states, but not\nall the hardware)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_reboot"
    },
    "setUSBHID": {
      "!type": "fn(opts: ?)",
      "!doc": "<p>USB HID will only take effect next time you unplug and re-plug your Espruino. If you&#39;re\ndisconnecting it from power you&#39;ll have to make sure you have <code>save()</code>d after calling\nthis function.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_setUSBHID"
    },
    "sendUSBHID": {
      "!type": "fn(data: ?) -> bool",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_E_sendUSBHID"
    },
    "getBattery": {
      "!type": "fn() -> number",
      "!doc": "<p>In devices that come with batteries, this function returns\nthe battery charge percentage as an integer between 0 and 100.</p>\n<p><strong>Note:</strong> this is an estimation only, based on battery voltage.\nThe temperature of the battery (as well as the load being drawn\nfrom it at the time <code>E.getBattery</code> is called) will affect the\nreadings.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getBattery"
    },
    "getRTCPrescaler": {
      "!type": "fn(calibrate: bool) -> number",
      "!doc": "<p>Gets the RTC&#39;s current prescaler value if <code>calibrate</code> is undefined or false.</p>\n<p>If <code>calibrate</code> is true, the low speed oscillator&#39;s speed is calibrated against the high speed\noscillator (usually +/- 20 ppm) and a suggested value to be fed into <code>E.setRTCPrescaler(...)</code> is returned.</p>\n<p>See <code>E.setRTCPrescaler</code> for more information.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_getRTCPrescaler"
    },
    "showMenu": {
      "!type": "fn()",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_E_showMenu"
    },
    "showPrompt": {
      "!type": "fn()",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_E_showPrompt"
    },
    "unmountSD": {
      "!type": "fn()",
      "!doc": "<p>Unmount the SD card, so it can be removed. If you remove the SD card without calling this you may cause corruption, and you will be unable to access another SD card until you reset Espruino or call <code>E.unmountSD()</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_unmountSD"
    },
    "openFile": {
      "!type": "fn(path: ?, mode: ?) -> +File",
      "!doc": "<p>Open a file</p>\n",
      "!url": "http://www.espruino.com/Reference#l_E_openFile"
    }
  },
  "Error": {
    "!type": "fn(message: ?) -> ?",
    "!doc": "<p>Creates an Error object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Error_Error",
    "prototype": {
      "toString": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_Error_toString"
      }
    }
  },
  "SyntaxError": {
    "!type": "fn(message: ?) -> ?",
    "!doc": "<p>Creates a SyntaxError object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_SyntaxError_SyntaxError",
    "prototype": {
      "toString": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_SyntaxError_toString"
      }
    }
  },
  "TypeError": {
    "!type": "fn(message: ?) -> ?",
    "!doc": "<p>Creates a TypeError object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_TypeError_TypeError",
    "prototype": {
      "toString": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_TypeError_toString"
      }
    }
  },
  "InternalError": {
    "!type": "fn(message: ?) -> ?",
    "!doc": "<p>Creates an InternalError object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_InternalError_InternalError",
    "prototype": {
      "toString": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_InternalError_toString"
      }
    }
  },
  "ReferenceError": {
    "!type": "fn(message: ?) -> ?",
    "!doc": "<p>Creates a ReferenceError object</p>\n",
    "!url": "http://www.espruino.com/Reference#l_ReferenceError_ReferenceError",
    "prototype": {
      "toString": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_ReferenceError_toString"
      }
    }
  },
  "Array": {
    "!type": "fn(args: ?) -> ?",
    "!doc": "<p>Create an Array. Either give it one integer argument (&gt;=0) which is the length of the array, or any number of arguments</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Array_Array",
    "prototype": {
      "!stdProto": "Array",
      "toString": {
        "!type": "fn(radix: ?) -> ?",
        "!doc": "<p>Convert the Array to a string</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_toString"
      },
      "length": {
        "!type": "?",
        "!doc": "<p>Find the length of the array</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_length"
      },
      "indexOf": {
        "!type": "fn(value: ?, startIndex: number) -> ?",
        "!doc": "<p>Return the index of the value in the array, or -1</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_indexOf"
      },
      "includes": {
        "!type": "fn(value: ?, startIndex: number) -> bool",
        "!doc": "<p>Return <code>true</code> if the array includes the value, <code>false</code> otherwise</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_includes"
      },
      "join": {
        "!type": "fn(separator: ?) -> ?",
        "!doc": "<p>Join all elements of this array together into one string, using &#39;separator&#39; between them. eg. <code>[1,2,3].join(&#39; &#39;)==&#39;1 2 3&#39;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_join"
      },
      "push": {
        "!type": "fn(arguments: ?) -> number",
        "!doc": "<p>Push a new value onto the end of this array&#39;</p>\n<p>This is the opposite of <code>[1,2,3].unshift(0)</code>, which adds one or more elements to the beginning of the array.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_push"
      },
      "pop": {
        "!type": "fn() -> ?",
        "!doc": "<p>Remove and return the value on the end of this array.</p>\n<p>This is the opposite of <code>[1,2,3].shift()</code>, which removes an element from the beginning of the array.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_pop"
      },
      "map": {
        "!type": "fn(function: ?, thisArg: ?) -> ?",
        "!doc": "<p>Return an array which is made from the following: <code>A.map(function) = [function(A[0]), function(A[1]), ...]</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_map"
      },
      "forEach": {
        "!type": "fn(function: ?, thisArg: ?)",
        "!doc": "<p>Executes a provided function once per array element.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_forEach"
      },
      "filter": {
        "!type": "fn(function: ?, thisArg: ?) -> ?",
        "!doc": "<p>Return an array which contains only those elements for which the callback function returns &#39;true&#39;</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_filter"
      },
      "some": {
        "!type": "fn(function: ?, thisArg: ?) -> ?",
        "!doc": "<p>Return &#39;true&#39; if the callback returns &#39;true&#39; for any of the elements in the array</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_some"
      },
      "every": {
        "!type": "fn(function: ?, thisArg: ?) -> ?",
        "!doc": "<p>Return &#39;true&#39; if the callback returns &#39;true&#39; for every element in the array</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_every"
      },
      "reduce": {
        "!type": "fn(callback: ?, initialValue: ?) -> ?",
        "!doc": "<p>Execute <code>previousValue=initialValue</code> and then <code>previousValue = callback(previousValue, currentValue, index, array)</code> for each element in the array, and finally return previousValue.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_reduce"
      },
      "splice": {
        "!type": "fn(index: number, howMany: ?, elements: ?) -> ?",
        "!doc": "<p>Both remove and add items to an array</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_splice"
      },
      "shift": {
        "!type": "fn() -> ?",
        "!doc": "<p>Remove and return the first element of the array.</p>\n<p>This is the opposite of <code>[1,2,3].pop()</code>, which takes an element off the end.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_shift"
      },
      "unshift": {
        "!type": "fn(elements: ?) -> number",
        "!doc": "<p>Add one or more items to the start of the array, and return its new length.</p>\n<p>This is the opposite of <code>[1,2,3].push(4)</code>, which puts one or more elements on the end.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_unshift"
      },
      "slice": {
        "!type": "fn(start: number, end: ?) -> ?",
        "!doc": "<p>Return a copy of a portion of this array (in a new array)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_slice"
      },
      "sort": {
        "!type": "fn(var: ?) -> ?",
        "!doc": "<p>Do an in-place quicksort of the array</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_sort"
      },
      "concat": {
        "!type": "fn(args: ?) -> ?",
        "!doc": "<p>Create a new array, containing the elements from this one and any arguments, if any argument is an array then those elements will be added.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_concat"
      },
      "fill": {
        "!type": "fn(value: ?, start: number, end: ?) -> ?",
        "!doc": "<p>Fill this array with the given value, for every index <code>&gt;= start</code> and <code>&lt; end</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_fill"
      },
      "reverse": {
        "!type": "fn() -> ?",
        "!doc": "<p>Reverse all elements in this array (in place)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Array_reverse"
      }
    },
    "isArray": {
      "!type": "fn(var: ?) -> bool",
      "!doc": "<p>Returns true if the provided object is an array</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Array_isArray"
    }
  },
  "RegExp": {
    "!type": "fn(regex: ?, regex: ?) -> +RegExp",
    "!doc": "<p>Creates a RegExp object, for handling Regular Expressions</p>\n",
    "!url": "http://www.espruino.com/Reference#l_RegExp_RegExp",
    "prototype": {
      "!stdProto": "RegExp",
      "test": {
        "!type": "fn(str: ?) -> bool",
        "!doc": "<p>Test this regex on a string - returns <code>true</code> on a successful match, or <code>false</code> otherwise</p>\n",
        "!url": "http://www.espruino.com/Reference#l_RegExp_test"
      }
    }
  },
  "String": {
    "!type": "fn(str: ?) -> ?",
    "!doc": "<p>Create a new String</p>\n",
    "!url": "http://www.espruino.com/Reference#l_String_String",
    "prototype": {
      "!stdProto": "String",
      "length": {
        "!type": "?",
        "!doc": "<p>Find the length of the string</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_length"
      },
      "charAt": {
        "!type": "fn(pos: number) -> ?",
        "!doc": "<p>Return a single character at the given position in the String.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_charAt"
      },
      "charCodeAt": {
        "!type": "fn(pos: number) -> number",
        "!doc": "<p>Return the integer value of a single character at the given position in the String.</p>\n<p>Note that this returns 0 not &#39;NaN&#39; for out of bounds characters</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_charCodeAt"
      },
      "indexOf": {
        "!type": "fn(substring: ?, fromIndex: ?) -> number",
        "!doc": "<p>Return the index of substring in this string, or -1 if not found</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_indexOf"
      },
      "lastIndexOf": {
        "!type": "fn(substring: ?, fromIndex: ?) -> number",
        "!doc": "<p>Return the last index of substring in this string, or -1 if not found</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_lastIndexOf"
      },
      "replace": {
        "!type": "fn(subStr: ?, newSubStr: ?) -> ?",
        "!doc": "<p>Search and replace ONE occurrance of <code>subStr</code> with <code>newSubStr</code> and return the result. This doesn&#39;t alter the original string. Regular expressions not supported.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_replace"
      },
      "substring": {
        "!type": "fn(start: number, end: ?) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_substring"
      },
      "substr": {
        "!type": "fn(start: number, len: ?) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_substr"
      },
      "slice": {
        "!type": "fn(start: number, end: ?) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_slice"
      },
      "split": {
        "!type": "fn(separator: ?) -> ?",
        "!doc": "<p>Return an array made by splitting this string up by the separator. eg. <code>&#39;1,2,3&#39;.split(&#39;,&#39;)==[&#39;1&#39;, &#39;2&#39;, &#39;3&#39;]</code></p>\n<p>Regular Expressions can also be used to split strings, eg. <code>&#39;1a2b3 4&#39;.split(/[^0-9]/)==[&#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;]</code>.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_split"
      },
      "toLowerCase": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_toLowerCase"
      },
      "toUpperCase": {
        "!type": "fn() -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_toUpperCase"
      },
      "trim": {
        "!type": "fn() -> +String",
        "!doc": "<p>Return a new string with any whitespace (tabs, space, form feed, newline,\ncarriage return, etc) removed from the beginning and end.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_trim"
      },
      "startsWith": {
        "!type": "fn(searchString: ?, position: number) -> bool",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_startsWith"
      },
      "endsWith": {
        "!type": "fn(searchString: ?, length: ?) -> bool",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_endsWith"
      },
      "includes": {
        "!type": "fn(substring: ?, fromIndex: ?) -> bool",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_String_includes"
      },
      "repeat": {
        "!type": "fn(count: number) -> +String",
        "!doc": "<p>Repeat this string the given number of times.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_String_repeat"
      }
    },
    "fromCharCode": {
      "!type": "fn(code: ?) -> ?",
      "!doc": "<p>Return the character(s) represented by the given character code(s).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_String_fromCharCode"
    }
  },
  "Pin": {
    "!type": "fn(value: ?) -> ?",
    "!doc": "<p>Creates a pin from the given argument (or returns undefined if no argument)</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Pin_Pin",
    "prototype": {
      "read": {
        "!type": "fn() -> bool",
        "!doc": "<p>Returns the input state of the pin as a boolean.</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset the pin&#39;s state to <code>&quot;input&quot;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_read"
      },
      "set": {
        "!type": "fn()",
        "!doc": "<p>Sets the output state of the pin to a 1</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset the pin&#39;s state to <code>&quot;output&quot;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_set"
      },
      "reset": {
        "!type": "fn()",
        "!doc": "<p>Sets the output state of the pin to a 0</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset the pin&#39;s state to <code>&quot;output&quot;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_reset"
      },
      "write": {
        "!type": "fn(value: bool)",
        "!doc": "<p>Sets the output state of the pin to the parameter given</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset the pin&#39;s state to <code>&quot;output&quot;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_write"
      },
      "writeAtTime": {
        "!type": "fn(value: bool, time: number)",
        "!doc": "<p>Sets the output state of the pin to the parameter given at the specified time.</p>\n<p> <strong>Note:</strong> this <strong>doesn&#39;t</strong> change the mode of the pin to an output. To do that, you need to use <code>pin.write(0)</code> or <code>pinMode(pin, &#39;output&#39;)</code> first.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_writeAtTime"
      },
      "getMode": {
        "!type": "fn() -> ?",
        "!doc": "<p>Return the current mode of the given pin. See <code>pinMode</code> for more information.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_getMode"
      },
      "mode": {
        "!type": "fn(mode: ?)",
        "!doc": "<p>Set the mode of the given pin. See <a href=\"#l__global_pinMode\"><code>pinMode</code></a> for more information on pin modes.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_mode"
      },
      "toggle": {
        "!type": "fn() -> bool",
        "!doc": "<p>Toggles the state of the pin from off to on, or from on to off.</p>\n<p><strong>Note:</strong> This method doesn&#39;t currently work on the ESP8266 port of Espruino.</p>\n<p><strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset the pin&#39;s state to <code>&quot;output&quot;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Pin_toggle"
      }
    }
  },
  "Modules": {
    "!type": "fn()",
    "!doc": "<p>Built-in class that caches the modules used by the <code>require</code> command</p>\n",
    "!url": "http://www.espruino.com/Reference#Modules",
    "getCached": {
      "!type": "fn() -> ?",
      "!doc": "<p>Return an array of module names that have been cached</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Modules_getCached"
    },
    "removeCached": {
      "!type": "fn(id: ?)",
      "!doc": "<p>Remove the given module from the list of cached modules</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Modules_removeCached"
    },
    "removeAllCached": {
      "!type": "fn()",
      "!doc": "<p>Remove all cached modules</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Modules_removeAllCached"
    },
    "addCached": {
      "!type": "fn(id: ?, sourcecode: ?)",
      "!doc": "<p>Add the given module to the cache</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Modules_addCached"
    }
  },
  "Promise": {
    "!type": "fn(executor: ?) -> ?",
    "!doc": "<p>Create a new Promise. The executor function is executed immediately (before the constructor even returns)\nand</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Promise_Promise",
    "all": {
      "!type": "fn(promises: ?) -> ?",
      "!doc": "<p>Return a new promise that is resolved when all promises in the supplied\narray are resolved.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Promise_all"
    },
    "resolve": {
      "!type": "fn(promises: ?) -> ?",
      "!doc": "<p>Return a new promise that is already resolved (at idle it&#39;ll\ncall <code>.then</code>)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Promise_resolve"
    },
    "reject": {
      "!type": "fn(promises: ?) -> ?",
      "!doc": "<p>Return a new promise that is already rejected (at idle it&#39;ll\ncall <code>.catch</code>)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Promise_reject"
    },
    "prototype": {
      "then": {
        "!type": "fn(onFulfilled: ?, onRejected: ?) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_Promise_then"
      },
      "catch": {
        "!type": "fn(onRejected: ?) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_Promise_catch"
      }
    }
  },
  "DataView": {
    "!type": "fn(buffer: ?, byteOffset: number, byteLength: number) -> +DataView",
    "!doc": "<p>This class helps</p>\n",
    "!url": "http://www.espruino.com/Reference#DataView",
    "prototype": {
      "getFloat32": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getFloat32"
      },
      "getFloat64": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getFloat64"
      },
      "getInt8": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getInt8"
      },
      "getInt16": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getInt16"
      },
      "getInt32": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getInt32"
      },
      "getUint8": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getUint8"
      },
      "getUint16": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getUint16"
      },
      "getUint32": {
        "!type": "fn(byteOffset: number, littleEndian: bool) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_getUint32"
      },
      "setFloat32": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setFloat32"
      },
      "setFloat64": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setFloat64"
      },
      "setInt8": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setInt8"
      },
      "setInt16": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setInt16"
      },
      "setInt32": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setInt32"
      },
      "setUint8": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setUint8"
      },
      "setUint16": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setUint16"
      },
      "setUint32": {
        "!type": "fn(byteOffset: number, value: ?, littleEndian: bool)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_DataView_setUint32"
      }
    }
  },
  "Waveform": {
    "!type": "fn(samples: number, options: ?) -> ?",
    "!doc": "<p>Create a waveform class. This allows high speed input and output of waveforms. It has an internal variable called <code>buffer</code> (as well as <code>buffer2</code> when double-buffered - see <code>options</code> below) which contains the data to input/output.</p>\n<p>When double-buffered, a &#39;buffer&#39; event will be emitted each time a buffer is finished with (the argument is that buffer). When the recording stops, a &#39;finish&#39; event will be emitted (with the first argument as the buffer).</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Waveform_Waveform",
    "prototype": {
      "startOutput": {
        "!type": "fn(output: +Pin, freq: number, options: ?)",
        "!doc": "<p>Will start outputting the waveform on the given pin - the pin must have previously been initialised with analogWrite. If not repeating, it&#39;ll emit a <code>finish</code> event when it is done.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Waveform_startOutput"
      },
      "startInput": {
        "!type": "fn(output: +Pin, freq: number, options: ?)",
        "!doc": "<p>Will start inputting the waveform on the given pin that supports analog. If not repeating, it&#39;ll emit a <code>finish</code> event when it is done.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Waveform_startInput"
      },
      "stop": {
        "!type": "fn()",
        "!doc": "<p>Stop a waveform that is currently outputting</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Waveform_stop"
      }
    }
  },
  "JSON": {
    "!type": "fn()",
    "!doc": "<p>An Object that handles conversion to and from the JSON data interchange format</p>\n",
    "!url": "http://www.espruino.com/Reference#JSON",
    "stringify": {
      "!type": "fn(data: ?, replacer: ?, space: ?) -> ?",
      "!doc": "<p>Convert the given object into a JSON string which can subsequently be parsed with JSON.parse or eval.</p>\n<p><strong>Note:</strong> This differs from JavaScript&#39;s standard <code>JSON.stringify</code> in that:</p>\n<ul>\n<li>The <code>replacer</code> argument is ignored</li>\n<li>Typed arrays like <code>new Uint8Array(5)</code> will be dumped as if they were arrays, not as if they were objects (since it is more compact)</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_JSON_stringify"
    },
    "parse": {
      "!type": "fn(string: ?) -> ?",
      "!doc": "<p>Parse the given JSON string into a JavaScript object</p>\n<p>NOTE: This implementation uses eval() internally, and as such it is unsafe as it can allow arbitrary JS commands to be executed.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_JSON_parse"
    }
  },
  "OneWire": {
    "!type": "fn(pin: +Pin) -> ?",
    "!doc": "<p>Create a software OneWire implementation on the given pin</p>\n",
    "!url": "http://www.espruino.com/Reference#l_OneWire_OneWire",
    "prototype": {
      "reset": {
        "!type": "fn() -> bool",
        "!doc": "<p>Perform a reset cycle</p>\n",
        "!url": "http://www.espruino.com/Reference#l_OneWire_reset"
      },
      "select": {
        "!type": "fn(rom: ?)",
        "!doc": "<p>Select a ROM - always performs a reset first</p>\n",
        "!url": "http://www.espruino.com/Reference#l_OneWire_select"
      },
      "skip": {
        "!type": "fn()",
        "!doc": "<p>Skip a ROM</p>\n",
        "!url": "http://www.espruino.com/Reference#l_OneWire_skip"
      },
      "write": {
        "!type": "fn(data: ?, power: bool)",
        "!doc": "<p>Write one or more bytes</p>\n",
        "!url": "http://www.espruino.com/Reference#l_OneWire_write"
      },
      "read": {
        "!type": "fn(count: ?) -> ?",
        "!doc": "<p>Read a byte</p>\n",
        "!url": "http://www.espruino.com/Reference#l_OneWire_read"
      },
      "search": {
        "!type": "fn(command: number) -> ?",
        "!doc": "<p>Search for devices</p>\n",
        "!url": "http://www.espruino.com/Reference#l_OneWire_search"
      }
    }
  },
  "Number": {
    "!type": "fn(value: ?) -> ?",
    "!doc": "<p>Creates a number</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Number_Number",
    "NaN": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Number_NaN"
    },
    "MAX_VALUE": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Number_MAX_VALUE"
    },
    "MIN_VALUE": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Number_MIN_VALUE"
    },
    "NEGATIVE_INFINITY": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Number_NEGATIVE_INFINITY"
    },
    "POSITIVE_INFINITY": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Number_POSITIVE_INFINITY"
    },
    "prototype": {
      "!stdProto": "Number",
      "toFixed": {
        "!type": "fn(decimalPlaces: number) -> ?",
        "!doc": "<p>Format the number as a fixed point number</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Number_toFixed"
      }
    }
  },
  "SPI": {
    "!type": "fn() -> ?",
    "!doc": "<p>Create a software SPI port. This has limited functionality (no baud rate), but it can work on any pins.</p>\n<p>Use <code>SPI.setup</code> to configure this port.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_SPI_SPI",
    "find": {
      "!type": "fn(pin: +Pin) -> ?",
      "!doc": "<p>Try and find an SPI hardware device that will work on this pin (eg. <code>SPI1</code>)</p>\n<p>May return undefined if no device can be found.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_SPI_find"
    },
    "prototype": {
      "send": {
        "!type": "fn(data: ?, nss_pin: +Pin) -> ?",
        "!doc": "<p>Send data down SPI, and return the result. Sending an integer will return an integer, a String will return a String, and anything else will return a Uint8Array.</p>\n<p>Sending multiple bytes in one call to send is preferable as they can then be transmitted end to end. Using multiple calls to send() will result in significantly slower transmission speeds.</p>\n<p>For maximum speeds, please pass either Strings or Typed Arrays as arguments. Note that you can even pass arrays of arrays, like <code>[1,[2,3,4],5]</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_SPI_send"
      },
      "write": {
        "!type": "fn(data: ?)",
        "!doc": "<p>Write a character or array of characters to SPI - without reading the result back.</p>\n<p>For maximum speeds, please pass either Strings or Typed Arrays as arguments.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_SPI_write"
      },
      "send4bit": {
        "!type": "fn(data: ?, bit0: number, bit1: number, nss_pin: +Pin)",
        "!doc": "<p>Send data down SPI, using 4 bits for each &#39;real&#39; bit (MSB first). This can be useful for faking one-wire style protocols</p>\n<p>Sending multiple bytes in one call to send is preferable as they can then be transmitted end to end. Using multiple calls to send() will result in significantly slower transmission speeds.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_SPI_send4bit"
      },
      "send8bit": {
        "!type": "fn(data: ?, bit0: number, bit1: number, nss_pin: +Pin)",
        "!doc": "<p>Send data down SPI, using 8 bits for each &#39;real&#39; bit (MSB first). This can be useful for faking one-wire style protocols</p>\n<p>Sending multiple bytes in one call to send is preferable as they can then be transmitted end to end. Using multiple calls to send() will result in significantly slower transmission speeds.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_SPI_send8bit"
      }
    }
  },
  "SPI1": {
    "!type": "+SPI",
    "!doc": "<p>The first SPI port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_SPI1"
  },
  "SPI2": {
    "!type": "+SPI",
    "!doc": "<p>The second SPI port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_SPI2"
  },
  "SPI3": {
    "!type": "+SPI",
    "!doc": "<p>The third SPI port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_SPI3"
  },
  "I2C": {
    "!type": "fn() -> ?",
    "!doc": "<p>Create a software I2C port. This has limited functionality (no baud rate), but it can work on any pins.</p>\n<p>Use <code>I2C.setup</code> to configure this port.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_I2C_I2C",
    "find": {
      "!type": "fn(pin: +Pin) -> ?",
      "!doc": "<p>Try and find an I2C hardware device that will work on this pin (eg. <code>I2C1</code>)</p>\n<p>May return undefined if no device can be found.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_I2C_find"
    },
    "prototype": {
      "setup": {
        "!type": "fn(options: ?)",
        "!doc": "<p>Set up this I2C port</p>\n<p>If not specified in options, the default pins are used (usually the lowest numbered pins on the lowest port that supports this peripheral)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_I2C_setup"
      },
      "writeTo": {
        "!type": "fn(address: ?, data: ?)",
        "!doc": "<p>Transmit to the slave device with the given address. This is like Arduino&#39;s beginTransmission, write, and endTransmission rolled up into one.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_I2C_writeTo"
      },
      "readFrom": {
        "!type": "fn(address: ?, quantity: number) -> +Uint8Array",
        "!doc": "<p>Request bytes from the given slave device, and return them as a Uint8Array (packed array of bytes). This is like using Arduino Wire&#39;s requestFrom, available and read functions.  Sends a STOP</p>\n",
        "!url": "http://www.espruino.com/Reference#l_I2C_readFrom"
      }
    }
  },
  "I2C1": {
    "!type": "+I2C",
    "!doc": "<p>The first I2C port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_I2C1"
  },
  "I2C2": {
    "!type": "+I2C",
    "!doc": "<p>The second I2C port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_I2C2"
  },
  "I2C3": {
    "!type": "+I2C",
    "!doc": "<p>The third I2C port</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_I2C3"
  },
  "console": {
    "!type": "fn()",
    "!doc": "<p>An Object that contains functions for writing to the interactive console</p>\n",
    "!url": "http://www.espruino.com/Reference#console",
    "log": {
      "!type": "fn(text: ?)",
      "!doc": "<p>Print the supplied string(s) to the console</p>\n<p> <strong>Note:</strong> If you&#39;re connected to a computer (not a wall adaptor) via USB but <strong>you are not running a terminal app</strong> then when you print data Espruino may pause execution and wait until the computer requests the data it is trying to print.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_console_log"
    }
  },
  "tv": {
    "!type": "fn()",
    "!doc": "<p>This library provides TV out capability on the Espruino and Espruino Pico.</p>\n<p>See the <a href=\"/Television\">Television</a> page for more information.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_tv_undefined"
  },
  "crypto": {
    "!type": "fn()",
    "!doc": "<p>Cryptographic functions</p>\n<p><strong>Note:</strong> This library is currently only included in builds for boards where there is space. For other boards there is <code>crypto.js</code> which implements SHA1 in JS.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_crypto_undefined",
    "AES": {
      "!type": "?",
      "!doc": "<p>Class containing AES encryption/decryption</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_AES"
    },
    "SHA1": {
      "!type": "fn(message: ?) -> +ArrayBuffer",
      "!doc": "<p>Performs a SHA1 hash and returns the result as a 20 byte ArrayBuffer.</p>\n<p><strong>Note:</strong> On some boards (currently only Espruino Original) there\nisn&#39;t space for a fully unrolled SHA1 implementation so a slower\nall-JS implementation is used instead.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_SHA1"
    },
    "SHA224": {
      "!type": "fn(message: ?) -> +ArrayBuffer",
      "!doc": "<p>Performs a SHA224 hash and returns the result as a 28 byte ArrayBuffer</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_SHA224"
    },
    "SHA256": {
      "!type": "fn(message: ?) -> +ArrayBuffer",
      "!doc": "<p>Performs a SHA256 hash and returns the result as a 32 byte ArrayBuffer</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_SHA256"
    },
    "SHA384": {
      "!type": "fn(message: ?) -> +ArrayBuffer",
      "!doc": "<p>Performs a SHA384 hash and returns the result as a 48 byte ArrayBuffer</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_SHA384"
    },
    "SHA512": {
      "!type": "fn(message: ?) -> +ArrayBuffer",
      "!doc": "<p>Performs a SHA512 hash and returns the result as a 64 byte ArrayBuffer</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_SHA512"
    },
    "PBKDF2": {
      "!type": "fn(passphrase: ?, salt: ?, options: ?) -> +ArrayBuffer",
      "!doc": "<p>Password-Based Key Derivation Function 2 algorithm, using SHA512</p>\n",
      "!url": "http://www.espruino.com/Reference#l_crypto_PBKDF2"
    }
  },
  "AES": {
    "!type": "fn()",
    "!doc": "<p>Class containing AES encryption/decryption</p>\n<p><strong>Note:</strong> This library is currently only included in builds for boards where there is space. For other boards there is <code>crypto.js</code> which implements SHA1 in JS.</p>\n",
    "!url": "http://www.espruino.com/Reference#AES",
    "encrypt": {
      "!type": "fn(passphrase: ?, key: ?, options: ?) -> +ArrayBuffer",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_AES_encrypt"
    },
    "decrypt": {
      "!type": "fn(passphrase: ?, key: ?, options: ?) -> +ArrayBuffer",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_AES_decrypt"
    }
  },
  "NRF": {
    "!type": "fn()",
    "!doc": "<p>The NRF class is for controlling functionality of the Nordic nRF51/nRF52 chips.</p>\n<p>Most functionality is related to Bluetooth Low Energy, however there are also some functions related to NFC that apply to NRF52-based devices.</p>\n",
    "!url": "http://www.espruino.com/Reference#NRF",
    "disconnect": {
      "!type": "fn()",
      "!doc": "<p>If a device is connected to Espruino, disconnect from it.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_disconnect"
    },
    "sleep": {
      "!type": "fn()",
      "!doc": "<p>Disable Bluetooth advertising and disconnect from any device that\nconnected to Puck.js as a peripheral (this won&#39;t affect any devices\nthat Puck.js initiated connections to).</p>\n<p>This makes Puck.js undiscoverable, so it can&#39;t be connected to.</p>\n<p>Use <code>NRF.wake()</code> to wake up and make Puck.js connectable again.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_sleep"
    },
    "wake": {
      "!type": "fn()",
      "!doc": "<p>Enable Bluetooth advertising (this is enabled by default), which\nallows other devices to discover and connect to Puck.js.</p>\n<p>Use <code>NRF.sleep()</code> to disable advertising.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_wake"
    },
    "restart": {
      "!type": "fn(callback: ?)",
      "!doc": "<p>Restart the Bluetooth softdevice (if there is currently a BLE connection,\nit will queue a restart to be done when the connection closes).</p>\n<p>You shouldn&#39;t need to call this function in normal usage. However, Nordic&#39;s\nBLE softdevice has some settings that cannot be reset. For example there\nare only a certain number of unique UUIDs. Once these are all used the\nonly option is to restart the softdevice to clear them all out.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_restart"
    },
    "getAddress": {
      "!type": "fn() -> ?",
      "!doc": "<p>Get this device&#39;s default Bluetooth MAC address.</p>\n<p>For Puck.js, the last 5 characters of this (eg. <code>ee:ff</code>)\nare used in the device&#39;s advertised Bluetooth name.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_getAddress"
    },
    "getBattery": {
      "!type": "fn() -> number",
      "!doc": "<p>Get the battery level in volts (the voltage that the NRF chip is running off of).</p>\n<p>This is the battery level of the device itself - it has nothing to with any\ndevice that might be connected.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_getBattery"
    },
    "getAdvertisingData": {
      "!type": "fn(data: ?, options: ?) -> ?",
      "!doc": "<p>This is just like <code>NRF.setAdvertising</code>, except instead of advertising\nthe data, it returns the packet that would be advertised as an array.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_getAdvertisingData"
    },
    "setTxPower": {
      "!type": "fn(power: number)",
      "!doc": "<p>Set the BLE radio transmit power. The default TX power is 0 dBm.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_setTxPower"
    },
    "setLowPowerConnection": {
      "!type": "fn(lowPower: bool)",
      "!doc": "<p><strong>THIS IS DEPRECATED</strong> - please use <code>NRF.setConnectionInterval</code> for\nperipheral and <code>NRF.connect(addr, options)</code>/<code>BluetoothRemoteGATTServer.connect(options)</code>\nfor central connections.</p>\n<p>This sets the connection parameters - these affect the transfer speed and\npower usage when the device is connected.</p>\n<ul>\n<li>When not low power, the connection interval is between 7.5 and 20ms</li>\n<li>When low power, the connection interval is between 500 and 1000ms</li>\n</ul>\n<p>When low power connection is enabled, transfers of data over Bluetooth\nwill be very slow, however power usage while connected will be drastically\ndecreased.</p>\n<p>This will only take effect after the connection is disconnected and\nre-established.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_setLowPowerConnection"
    },
    "sendHIDReport": {
      "!type": "fn(data: ?, callback: ?)",
      "!doc": "<p>Send a USB HID report. HID must first be enabled with <code>NRF.setServices({}, {hid: hid_report})</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_sendHIDReport"
    },
    "setWhitelist": {
      "!type": "fn(whitelisting: bool)",
      "!doc": "<p>If set to true, whenever a device bonds it will be added to the\nwhitelist.</p>\n<p>When set to false, the whitelist is cleared and newly bonded\ndevices will not be added to the whitelist.</p>\n<p><strong>Note:</strong> This is remembered between <code>reset()</code>s but isn&#39;t\nremembered after power-on (you&#39;ll have to add it to <code>onInit()</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_setWhitelist"
    },
    "setConnectionInterval": {
      "!type": "fn(interval: ?)",
      "!doc": "<p>When connected, Bluetooth LE devices communicate at a set interval.\nLowering the interval (eg. more packets/second) means a lower delay when\nsending data, higher bandwidth, but also more power consumption.</p>\n<p>By default, when connected as a peripheral Espruino automatically adjusts the\nconnection interval. When connected it&#39;s as fast as possible (7.5ms) but when idle\nfor over a minute it drops to 200ms. On continued activity (&gt;1 BLE operation) the\ninterval is raised to 7.5ms again.</p>\n<p>The options for <code>interval</code> are:</p>\n<ul>\n<li><code>undefined</code> / <code>&quot;auto&quot;</code> : (default) automatically adjust connection interval</li>\n<li><code>100</code> : set min and max connection interval to the same number (between 7.5ms and 4000ms)</li>\n<li><code>{minInterval:20, maxInterval:100}</code> : set min and max connection interval as a range</li>\n</ul>\n<p>This configuration is not remembered during a <code>save()</code> - you will have to\nre-set it via <code>onInit</code>.</p>\n<p><strong>Note:</strong> If connecting to another device (as Central), you can use\nan extra argument to <code>NRF.connect</code> or <code>BluetoothRemoteGATTServer.connect</code>\nto specify a connection interval.</p>\n<p><strong>Note:</strong> This overwrites any changes imposed by the deprecated <code>NRF.setLowPowerConnection</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_NRF_setConnectionInterval"
    }
  },
  "Bluetooth": {
    "!type": "+Serial",
    "!doc": "<p>The Bluetooth Serial port - used when data is sent or received over Bluetooth Smart on nRF51/nRF52 chips.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Bluetooth"
  },
  "BluetoothRemoteGATTServer": {
    "!type": "fn()",
    "!doc": "<p>Web Bluetooth-style GATT server - get this using <code>NRF.connect(address)</code>\nor <code>NRF.requestDevice(options)</code> and <code>response.gatt.connect</code></p>\n<p><a href=\"https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver\">https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver</a></p>\n",
    "!url": "http://www.espruino.com/Reference#BluetoothRemoteGATTServer",
    "prototype": {
      "disconnect": {
        "!type": "fn() -> +Promise",
        "!doc": "<p>Disconnect from a previously connected BLE device connected with\n<code>BluetoothRemoteGATTServer.connect</code> - this does not disconnect from something that has\nconnected to the Espruino.</p>\n<p><strong>Note:</strong> While <code>.disconnect</code> is standard Web Bluetooth, in the spec it\nreturns undefined not a <code>Promise</code> for implementation reasons. In Espruino\nwe return a <code>Promise</code> to make it easier to detect when Espruino is free\nto connect to something else.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_BluetoothRemoteGATTServer_disconnect"
      },
      "getPrimaryService": {
        "!type": "fn(service: ?) -> +Promise",
        "!doc": "<p>See <code>NRF.connect</code> for usage examples.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_BluetoothRemoteGATTServer_getPrimaryService"
      },
      "getPrimaryServices": {
        "!type": "fn() -> +Promise",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_BluetoothRemoteGATTServer_getPrimaryServices"
      }
    }
  },
  "BluetoothRemoteGATTService": {
    "!type": "fn()",
    "!doc": "<p>Web Bluetooth-style GATT service - get this using <code>BluetoothRemoteGATTServer.getPrimaryService(s)</code></p>\n<p><a href=\"https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice\">https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice</a></p>\n",
    "!url": "http://www.espruino.com/Reference#BluetoothRemoteGATTService",
    "prototype": {
      "getCharacteristic": {
        "!type": "fn(characteristic: ?) -> +Promise",
        "!doc": "<p>See <code>NRF.connect</code> for usage examples.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_BluetoothRemoteGATTService_getCharacteristic"
      },
      "getCharacteristics": {
        "!type": "fn() -> +Promise",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_BluetoothRemoteGATTService_getCharacteristics"
      }
    }
  },
  "BluetoothRemoteGATTCharacteristic": {
    "!type": "fn()",
    "!doc": "<p>Web Bluetooth-style GATT characteristic - get this using <code>BluetoothRemoteGATTService.getCharacteristic(s)</code></p>\n<p><a href=\"https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic\">https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic</a></p>\n",
    "!url": "http://www.espruino.com/Reference#BluetoothRemoteGATTCharacteristic",
    "prototype": {
      "stopNotifications": {
        "!type": "fn() -> +Promise",
        "!doc": "<p>Stop notifications (that were requested with <code>BluetoothRemoteGATTCharacteristic.startNotifications</code>)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_BluetoothRemoteGATTCharacteristic_stopNotifications"
      }
    }
  },
  "Trig": {
    "!type": "fn()",
    "!doc": "<p>This class exists in order to interface Espruino with fast-moving trigger wheels. Trigger wheels are physical discs with evenly spaced teeth cut into them, and often with one or two teeth next to each other missing. A sensor sends a signal whenever a tooth passed by, and this allows a device to measure not only RPM, but absolute position.</p>\n<p>This class is currently in testing - it is NOT AVAILABLE on normal boards.</p>\n",
    "!url": "http://www.espruino.com/Reference#Trig",
    "getPosAtTime": {
      "!type": "fn(time: number) -> number",
      "!doc": "<p>Get the position of the trigger wheel at the given time (from getTime)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_getPosAtTime"
    },
    "setup": {
      "!type": "fn(pin: +Pin, options: ?)",
      "!doc": "<p>Initialise the trigger class</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_setup"
    },
    "setTrigger": {
      "!type": "fn(num: number, pos: number, pins: ?, pulseLength: number)",
      "!doc": "<p>Set a trigger for a certain point in the cycle</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_setTrigger"
    },
    "killTrigger": {
      "!type": "fn(num: number)",
      "!doc": "<p>Disable a trigger</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_killTrigger"
    },
    "getTrigger": {
      "!type": "fn(num: number) -> ?",
      "!doc": "<p>Get the current state of a trigger</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_getTrigger"
    },
    "getRPM": {
      "!type": "fn() -> number",
      "!doc": "<p>Get the RPM of the trigger wheel</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_getRPM"
    },
    "getErrors": {
      "!type": "fn() -> number",
      "!doc": "<p>Get the current error flags from the trigger wheel - and zero them</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_getErrors"
    },
    "getErrorArray": {
      "!type": "fn() -> ?",
      "!doc": "<p>Get the current error flags from the trigger wheel - and zero them</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Trig_getErrorArray"
    }
  },
  "Math": {
    "!type": "fn()",
    "!doc": "<p>This is a standard JavaScript class that contains useful Maths routines</p>\n",
    "!url": "http://www.espruino.com/Reference#Math",
    "E": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_E"
    },
    "PI": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_PI"
    },
    "LN2": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_LN2"
    },
    "LN10": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_LN10"
    },
    "LOG2E": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_LOG2E"
    },
    "LOG10E": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_LOG10E"
    },
    "SQRT2": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_SQRT2"
    },
    "SQRT1_2": {
      "!type": "number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_SQRT1_2"
    },
    "abs": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_abs"
    },
    "acos": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_acos"
    },
    "asin": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_asin"
    },
    "atan": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_atan"
    },
    "atan2": {
      "!type": "fn(y: number, x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_atan2"
    },
    "cos": {
      "!type": "fn(theta: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_cos"
    },
    "pow": {
      "!type": "fn(x: number, y: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_pow"
    },
    "random": {
      "!type": "fn() -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_random"
    },
    "round": {
      "!type": "fn(x: number) -> ?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_round"
    },
    "sin": {
      "!type": "fn(theta: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_sin"
    },
    "tan": {
      "!type": "fn(theta: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_tan"
    },
    "sqrt": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_sqrt"
    },
    "ceil": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_ceil"
    },
    "floor": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_floor"
    },
    "exp": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_exp"
    },
    "log": {
      "!type": "fn(x: number) -> number",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Math_log"
    },
    "clip": {
      "!type": "fn(x: number, min: number, max: number) -> number",
      "!doc": "<p>DEPRECATED - Please use <code>E.clip()</code> instead. Clip a number to be between min and max (inclusive)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Math_clip"
    },
    "wrap": {
      "!type": "fn(x: number, max: number) -> number",
      "!doc": "<p>DEPRECATED - This is not part of standard JavaScript libraries</p>\n<p>Wrap a number around if it is less than 0 or greater than or equal to max. For instance you might do: <code>Math.wrap(angleInDegrees, 360)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Math_wrap"
    },
    "min": {
      "!type": "fn(args: ?) -> number",
      "!doc": "<p>Find the minimum of a series of numbers</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Math_min"
    },
    "max": {
      "!type": "fn(args: ?) -> number",
      "!doc": "<p>Find the maximum of a series of numbers</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Math_max"
    }
  },
  "heatshrink": {
    "!type": "fn()",
    "!doc": "<p>Simple library for compression/decompression using <a href=\"https://github.com/atomicobject/heatshrink\">heatshrink</a>, an <a href=\"https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Storer%E2%80%93Szymanski\">LZSS</a> compression tool.</p>\n<p>Espruino uses heatshrink internally to compress RAM down to fit in Flash memory when <code>save()</code> is used. This just exposes that functionality.</p>\n<p>Functions here take and return buffers of data. There is no support for streaming, so both the compressed and decompressed data must be able to fit in memory at the same time.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_heatshrink_undefined",
    "compress": {
      "!type": "fn(data: ?) -> +ArrayBuffer",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_heatshrink_compress"
    },
    "decompress": {
      "!type": "fn(data: ?) -> +ArrayBuffer",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_heatshrink_decompress"
    }
  },
  "Pixl": {
    "!type": "fn()",
    "!doc": "<p>Class containing utility functions for <a href=\"http://www.espruino.com/Pixl.js\">Pixl.js</a></p>\n",
    "!url": "http://www.espruino.com/Reference#Pixl",
    "getBatteryPercentage": {
      "!type": "fn() -> number",
      "!doc": "<p>DEPRECATED - Please use <code>E.getBattery()</code> instead.</p>\n<p>Return an approximate battery percentage remaining based on\na normal CR2032 battery (2.8 - 2.2v)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Pixl_getBatteryPercentage"
    },
    "setContrast": {
      "!type": "fn(c: number)",
      "!doc": "<p>Set the LCD&#39;s contrast</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Pixl_setContrast"
    },
    "setLCDPower": {
      "!type": "fn(isOn: bool)",
      "!doc": "<p>This function can be used to turn Pixl.js&#39;s LCD off or on.</p>\n<ul>\n<li>With the LCD off, Pixl.js draws around 0.1mA</li>\n<li>With the LCD on, Pixl.js draws around 0.25mA</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_Pixl_setLCDPower"
    },
    "lcdw": {
      "!type": "fn(c: number)",
      "!doc": "<p>Writes a command directly to the ST7567 LCD controller</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Pixl_lcdw"
    },
    "menu": {
      "!type": "fn(menu: ?) -> ?",
      "!doc": "<p>Display a menu on Pixl.js&#39;s screen, and set up the buttons to navigate through it.</p>\n<p>DEPRECATED: Use <code>E.showMenu</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Pixl_menu"
    }
  },
  "neopixel": {
    "!type": "fn()",
    "!doc": "<p>This library allows you to write to Neopixel/WS281x/APA10x/SK6812 LED strips</p>\n<p>These use a high speed single-wire protocol which needs platform-specific\nimplementation on some devices - hence this library to simplify things.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_neopixel_undefined"
  },
  "http": {
    "!type": "fn()",
    "!doc": "<p>This library allows you to create http servers and make http requests</p>\n<p>In order to use this, you will need an extra module to get network connectivity such as the <a href=\"/CC3000\">TI CC3000</a> or <a href=\"/WIZnet\">WIZnet W5500</a>.</p>\n<p>This is designed to be a cut-down version of the <a href=\"http://nodejs.org/api/http.html\">node.js library</a>. Please see the <a href=\"/Internet\">Internet</a> page for more information on how to use it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_http_undefined",
    "createServer": {
      "!type": "fn(callback: ?) -> +httpSrv",
      "!doc": "<p>Create an HTTP Server</p>\n<p>When a request to the server is made, the callback is called. In the callback you can use the methods on the response (<code>httpSRs</code>) to send data. You can also add <code>request.on(&#39;data&#39;,function() { ... })</code> to listen for POSTed data</p>\n",
      "!url": "http://www.espruino.com/Reference#l_http_createServer"
    }
  },
  "httpSrv": {
    "!type": "fn()",
    "!doc": "<p>The HTTP server created by <code>require(&#39;http&#39;).createServer</code></p>\n",
    "!url": "http://www.espruino.com/Reference#httpSrv",
    "prototype": {
      "listen": {
        "!type": "fn(port: number) -> ?",
        "!doc": "<p>Start listening for new HTTP connections on the given port</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSrv_listen"
      },
      "close": {
        "!type": "fn()",
        "!doc": "<p>Stop listening for new HTTP connections</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSrv_close"
      }
    }
  },
  "httpSRq": {
    "!type": "fn()",
    "!doc": "<p>The HTTP server request</p>\n",
    "!url": "http://www.espruino.com/Reference#httpSRq",
    "prototype": {
      "headers": {
        "!type": "?",
        "!doc": "<p>The headers to sent to the server with this HTTP request.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRq_headers"
      },
      "method": {
        "!type": "?",
        "!doc": "<p>The HTTP method used with this request. Often <code>&quot;GET&quot;</code>.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRq_method"
      },
      "url": {
        "!type": "?",
        "!doc": "<p>The URL requested in this HTTP request, for instance:</p>\n<ul>\n<li><code>&quot;/&quot;</code> - the main page</li>\n<li><code>&quot;/favicon.ico&quot;</code> - the web page&#39;s icon</li>\n</ul>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRq_url"
      },
      "available": {
        "!type": "fn() -> number",
        "!doc": "<p>Return how many bytes are available to read. If there is already a listener for data, this will always return 0.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRq_available"
      },
      "read": {
        "!type": "fn(chars: number) -> ?",
        "!doc": "<p>Return a string containing characters that have been received</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRq_read"
      },
      "pipe": {
        "!type": "fn(destination: ?, options: ?)",
        "!doc": "<p>Pipe this to a stream (an object with a &#39;write&#39; method)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRq_pipe"
      }
    }
  },
  "httpSRs": {
    "!type": "fn()",
    "!doc": "<p>The HTTP server response</p>\n",
    "!url": "http://www.espruino.com/Reference#httpSRs",
    "prototype": {
      "write": {
        "!type": "fn(data: ?) -> bool",
        "!doc": "<p>This function writes the <code>data</code> argument as a string. Data that is passed in\n(including arrays) will be converted to a string with the normal JavaScript \n<code>toString</code> method. For more information about sending binary data see <code>Socket.write</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRs_write"
      },
      "end": {
        "!type": "fn(data: ?)",
        "!doc": "<p>See <code>Socket.write</code> for more information about the data argument</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRs_end"
      },
      "writeHead": {
        "!type": "fn(statusCode: number, headers: ?)",
        "!doc": "<p>Send the given status code and headers. If not explicitly called\nthis will be done automatically the first time data is written\nto the response.</p>\n<p>This cannot be called twice, or after data has already been sent\nin the response.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRs_writeHead"
      },
      "setHeader": {
        "!type": "fn(name: ?, value: ?)",
        "!doc": "<p>Set a value to send in the header of this HTTP response. This updates the <code>httpSRs.headers</code> property.</p>\n<p>Any headers supplied to <code>writeHead</code> will overwrite any headers with the same name.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpSRs_setHeader"
      }
    }
  },
  "httpCRq": {
    "!type": "fn()",
    "!doc": "<p>The HTTP client request, returned by <code>http.request()</code> and <code>http.get()</code>.</p>\n",
    "!url": "http://www.espruino.com/Reference#httpCRq",
    "prototype": {
      "write": {
        "!type": "fn(data: ?) -> bool",
        "!doc": "<p>This function writes the <code>data</code> argument as a string. Data that is passed in\n(including arrays) will be converted to a string with the normal JavaScript \n<code>toString</code> method. For more information about sending binary data see <code>Socket.write</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRq_write"
      },
      "end": {
        "!type": "fn(data: ?)",
        "!doc": "<p>Finish this HTTP request - optional data to append as an argument</p>\n<p>See <code>Socket.write</code> for more information about the data argument</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRq_end"
      }
    }
  },
  "httpCRs": {
    "!type": "fn()",
    "!doc": "<p>The HTTP client response, passed to the callback of <code>http.request()</code> an <code>http.get()</code>.</p>\n",
    "!url": "http://www.espruino.com/Reference#httpCRs",
    "prototype": {
      "headers": {
        "!type": "?",
        "!doc": "<p>The headers received along with the HTTP response</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_headers"
      },
      "statusCode": {
        "!type": "?",
        "!doc": "<p>The HTTP response&#39;s status code - usually <code>&quot;200&quot;</code> if all went well</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_statusCode"
      },
      "statusMessage": {
        "!type": "?",
        "!doc": "<p>The HTTP response&#39;s status message - Usually <code>&quot;OK&quot;</code> if all went well</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_statusMessage"
      },
      "httpVersion": {
        "!type": "?",
        "!doc": "<p>The HTTP version reported back by the server - usually <code>&quot;1.1&quot;</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_httpVersion"
      },
      "available": {
        "!type": "fn() -> number",
        "!doc": "<p>Return how many bytes are available to read. If there is a &#39;data&#39; event handler, this will always return 0.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_available"
      },
      "read": {
        "!type": "fn(chars: number) -> ?",
        "!doc": "<p>Return a string containing characters that have been received</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_read"
      },
      "pipe": {
        "!type": "fn(destination: ?, options: ?)",
        "!doc": "<p>Pipe this to a stream (an object with a &#39;write&#39; method)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_httpCRs_pipe"
      }
    }
  },
  "CC3000": {
    "!type": "fn()",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l_CC3000_undefined",
    "connect": {
      "!type": "fn(spi: ?, cs: +Pin, en: +Pin, irq: +Pin) -> +WLAN",
      "!doc": "<p>Initialise the CC3000 and return a WLAN object</p>\n",
      "!url": "http://www.espruino.com/Reference#l_CC3000_connect"
    }
  },
  "WLAN": {
    "!type": "fn()",
    "!doc": "<p>An instantiation of a WiFi network adaptor</p>\n",
    "!url": "http://www.espruino.com/Reference#WLAN",
    "prototype": {
      "connect": {
        "!type": "fn(ap: ?, key: ?, callback: ?) -> bool",
        "!doc": "<p>Connect to a wireless network</p>\n",
        "!url": "http://www.espruino.com/Reference#l_WLAN_connect"
      },
      "disconnect": {
        "!type": "fn()",
        "!doc": "<p>Completely uninitialise and power down the CC3000. After this you&#39;ll have to use <code>require(&quot;CC3000&quot;).connect()</code> again.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_WLAN_disconnect"
      },
      "reconnect": {
        "!type": "fn()",
        "!doc": "<p>Completely uninitialise and power down the CC3000, then reconnect to the old access point.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_WLAN_reconnect"
      },
      "getIP": {
        "!type": "fn() -> ?",
        "!doc": "<p>Get the current IP address</p>\n",
        "!url": "http://www.espruino.com/Reference#l_WLAN_getIP"
      },
      "setIP": {
        "!type": "fn(options: ?) -> bool",
        "!doc": "<p>Set the current IP address for get an IP from DHCP (if no options object is specified).</p>\n<p><strong>Note:</strong> Changes are written to non-volatile memory, but will only take effect after calling <code>wlan.reconnect()</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_WLAN_setIP"
      }
    }
  },
  "TelnetServer": {
    "!type": "fn()",
    "!doc": "<p>This library implements a telnet console for the Espruino interpreter. It requires a network\nconnection, e.g. Wifi, and <strong>currently only functions on the ESP8266 and on Linux </strong>. It uses\nport 23 on the ESP8266 and port 2323 on Linux.</p>\n<p><strong>Note:</strong> To enable on Linux, run <code>./espruino --telnet</code></p>\n",
    "!url": "http://www.espruino.com/Reference#l_TelnetServer_undefined",
    "setOptions": {
      "!type": "fn(options: ?)",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_TelnetServer_setOptions"
    }
  },
  "WIZnet": {
    "!type": "fn()",
    "!doc": "<p>Library for communication with the WIZnet Ethernet module</p>\n",
    "!url": "http://www.espruino.com/Reference#l_WIZnet_undefined",
    "connect": {
      "!type": "fn(spi: ?, cs: +Pin) -> +Ethernet",
      "!doc": "<p>Initialise the WIZnet module and return an Ethernet object</p>\n",
      "!url": "http://www.espruino.com/Reference#l_WIZnet_connect"
    }
  },
  "Ethernet": {
    "!type": "fn()",
    "!doc": "<p>An instantiation of an Ethernet network adaptor</p>\n",
    "!url": "http://www.espruino.com/Reference#Ethernet",
    "prototype": {
      "getIP": {
        "!type": "fn(options: ?) -> ?",
        "!doc": "<p>Get the current IP address, subnet, gateway and mac address.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Ethernet_getIP"
      },
      "setIP": {
        "!type": "fn(options: ?, callback: ?) -> bool",
        "!doc": "<p>Set the current IP address or get an IP from DHCP (if no options object is specified)</p>\n<p>If &#39;mac&#39; is specified as an option, it must be a string of the form <code>&quot;00:01:02:03:04:05&quot;</code>\nThe default mac is 00:08:DC:01:02:03.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Ethernet_setIP"
      },
      "setHostname": {
        "!type": "fn(hostname: ?, callback: ?) -> bool",
        "!doc": "<p>Set hostname allow to set the hosname used during the dhcp request.\nmin 8 and max 12 char, best set before calling <code>eth.setIP()</code>\nDefault is WIZnet010203, 010203 is the default nic as part of the mac.\nBest to set the hosname before calling setIP().</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Ethernet_setHostname"
      },
      "getHostname": {
        "!type": "fn(callback: ?) -> ?",
        "!doc": "<p>Returns the hostname</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Ethernet_getHostname"
      },
      "getStatus": {
        "!type": "fn(options: ?) -> ?",
        "!doc": "<p>Get the current status of the ethernet device</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Ethernet_getStatus"
      }
    }
  },
  "NetworkJS": {
    "!type": "fn()",
    "!doc": "<p>Library that initialises a network device that calls into JavaScript</p>\n",
    "!url": "http://www.espruino.com/Reference#l_NetworkJS_undefined"
  },
  "url": {
    "!type": "fn()",
    "!doc": "<p>This class helps to convert URLs into Objects of information ready for http.request/get</p>\n",
    "!url": "http://www.espruino.com/Reference#url",
    "parse": {
      "!type": "fn(urlStr: ?, parseQuery: bool) -> ?",
      "!doc": "<p>A utility function to split a URL into parts</p>\n<p>This is useful in web servers for instance when handling a request.</p>\n<p>For instance <code>url.parse(&quot;/a?b=c&amp;d=e&quot;,true)</code> returns <code>{&quot;method&quot;:&quot;GET&quot;,&quot;host&quot;:&quot;&quot;,&quot;path&quot;:&quot;/a?b=c&amp;d=e&quot;,&quot;pathname&quot;:&quot;/a&quot;,&quot;search&quot;:&quot;?b=c&amp;d=e&quot;,&quot;port&quot;:80,&quot;query&quot;:{&quot;b&quot;:&quot;c&quot;,&quot;d&quot;:&quot;e&quot;}}</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_url_parse"
    }
  },
  "net": {
    "!type": "fn()",
    "!doc": "<p>This library allows you to create TCPIP servers and clients</p>\n<p>In order to use this, you will need an extra module to get network connectivity.</p>\n<p>This is designed to be a cut-down version of the <a href=\"http://nodejs.org/api/net.html\">node.js library</a>. Please see the <a href=\"/Internet\">Internet</a> page for more information on how to use it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_net_undefined",
    "createServer": {
      "!type": "fn(callback: ?) -> +Server",
      "!doc": "<p>Create a Server</p>\n<p>When a request to the server is made, the callback is called. In the callback you can use the methods on the connection to send data. You can also add <code>connection.on(&#39;data&#39;,function() { ... })</code> to listen for received data</p>\n",
      "!url": "http://www.espruino.com/Reference#l_net_createServer"
    },
    "connect": {
      "!type": "fn(options: ?, callback: ?) -> +Socket",
      "!doc": "<p>Create a TCP socket connection</p>\n",
      "!url": "http://www.espruino.com/Reference#l_net_connect"
    }
  },
  "Server": {
    "!type": "fn()",
    "!doc": "<p>The socket server created by <code>require(&#39;net&#39;).createServer</code></p>\n",
    "!url": "http://www.espruino.com/Reference#Server",
    "prototype": {
      "listen": {
        "!type": "fn(port: number) -> ?",
        "!doc": "<p>Start listening for new connections on the given port</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Server_listen"
      },
      "close": {
        "!type": "fn()",
        "!doc": "<p>Stop listening for new connections</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Server_close"
      }
    }
  },
  "Socket": {
    "!type": "fn()",
    "!doc": "<p>An actual socket connection - allowing transmit/receive of TCP data</p>\n",
    "!url": "http://www.espruino.com/Reference#Socket",
    "prototype": {
      "available": {
        "!type": "fn() -> number",
        "!doc": "<p>Return how many bytes are available to read. If there is already a listener for data, this will always return 0.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Socket_available"
      },
      "read": {
        "!type": "fn(chars: number) -> ?",
        "!doc": "<p>Return a string containing characters that have been received</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Socket_read"
      },
      "pipe": {
        "!type": "fn(destination: ?, options: ?)",
        "!doc": "<p>Pipe this to a stream (an object with a &#39;write&#39; method)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Socket_pipe"
      },
      "end": {
        "!type": "fn(data: ?)",
        "!doc": "<p>Close this socket - optional data to append as an argument.</p>\n<p>See <code>Socket.write</code> for more information about the data argument</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Socket_end"
      }
    }
  },
  "dgram": {
    "!type": "fn()",
    "!doc": "<p>This library allows you to create UDP/DATAGRAM servers and clients</p>\n<p>In order to use this, you will need an extra module to get network connectivity.</p>\n<p>This is designed to be a cut-down version of the <a href=\"http://nodejs.org/api/dgram.html\">node.js library</a>. Please see the <a href=\"/Internet\">Internet</a> page for more information on how to use it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_dgram_undefined",
    "createSocket": {
      "!type": "fn(type: ?, callback: ?) -> +dgramSocket",
      "!doc": "<p>Create a UDP socket</p>\n",
      "!url": "http://www.espruino.com/Reference#l_dgram_createSocket"
    }
  },
  "dgramSocket": {
    "!type": "fn()",
    "!doc": "<p>An actual socket connection - allowing transmit/receive of TCP data</p>\n",
    "!url": "http://www.espruino.com/Reference#dgramSocket",
    "prototype": {
      "send": {
        "!type": "fn(buffer: ?, offset: ?, length: ?, args: ?)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_dgramSocket_send"
      },
      "bind": {
        "!type": "fn(port: number, callback: ?) -> ?",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_dgramSocket_bind"
      },
      "close": {
        "!type": "fn()",
        "!doc": "<p>Close the socket</p>\n",
        "!url": "http://www.espruino.com/Reference#l_dgramSocket_close"
      },
      "addMembership": {
        "!type": "fn(group: ?, ip: ?)",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_dgramSocket_addMembership"
      }
    }
  },
  "tls": {
    "!type": "fn()",
    "!doc": "<p>This library allows you to create TCPIP servers and clients using TLS encryption</p>\n<p>In order to use this, you will need an extra module to get network connectivity.</p>\n<p>This is designed to be a cut-down version of the <a href=\"http://nodejs.org/api/tls.html\">node.js library</a>. Please see the <a href=\"/Internet\">Internet</a> page for more information on how to use it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_tls_undefined"
  },
  "WioLTE": {
    "!type": "fn()",
    "!doc": "<p>Class containing utility functions for the Seeed WIO LTE board</p>\n",
    "!url": "http://www.espruino.com/Reference#WioLTE",
    "LED": {
      "!type": "fn(red: number, green: number, blue: number)",
      "!doc": "<p>Set the WIO&#39;s LED</p>\n",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_LED"
    },
    "setGrovePower": {
      "!type": "fn(onoff: bool)",
      "!doc": "<p>Set the power of Grove connectors, except for <code>D38</code> and <code>D39</code> which are always on.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_setGrovePower"
    },
    "setLEDPower": {
      "!type": "fn(onoff: bool)",
      "!doc": "<p>Turn power to the WIO&#39;s LED on or off.</p>\n<p>Turning the LED on won&#39;t immediately display a color - that must be done with <code>WioLTE.LED(r,g,b)</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_setLEDPower"
    },
    "D38": {
      "!type": "?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_D38"
    },
    "D20": {
      "!type": "?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_D20"
    },
    "A6": {
      "!type": "?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_A6"
    },
    "I2C": {
      "!type": "?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_I2C"
    },
    "UART": {
      "!type": "?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_UART"
    },
    "A4": {
      "!type": "?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_WioLTE_A4"
    }
  },
  "tensorflow": {
    "!type": "fn()",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l_tensorflow_undefined",
    "create": {
      "!type": "fn(arenaSize: number, model: ?) -> +TFMicroInterpreter",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_tensorflow_create"
    }
  },
  "TFMicroInterpreter": {
    "!type": "fn()",
    "!doc": "<p>Class containing an instance of TFMicroInterpreter</p>\n",
    "!url": "http://www.espruino.com/Reference#TFMicroInterpreter",
    "prototype": {
      "getInput": {
        "!type": "fn() -> +ArrayBufferView",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_TFMicroInterpreter_getInput"
      },
      "getOutput": {
        "!type": "fn() -> +ArrayBufferView",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_TFMicroInterpreter_getOutput"
      },
      "invoke": {
        "!type": "fn()",
        "!doc": "",
        "!url": "http://www.espruino.com/Reference#l_TFMicroInterpreter_invoke"
      }
    }
  },
  "Bangle": {
    "!type": "fn()",
    "!doc": "<p>Class containing utility functions for the <a href=\"http://www.espruino.com/Bangle.js\">Bangle.js Smart Watch</a></p>\n",
    "!url": "http://www.espruino.com/Reference#Bangle",
    "setLCDPower": {
      "!type": "fn(isOn: bool)",
      "!doc": "<p>This function can be used to turn Bangle.js&#39;s LCD off or on.</p>\n<p><strong>When on full, the LCD draws roughly 40mA.</strong> You can adjust\nWhen brightness using <code>Bange.setLCDBrightness</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setLCDPower"
    },
    "setLCDBrightness": {
      "!type": "fn(brightness: number)",
      "!doc": "<p>This function can be used to adjust the brightness of Bangle.js&#39;s display, and\nhence prolong its battery life.</p>\n<p>Due to hardware design constraints, software PWM has to be used which\nmeans that the display may flicker slightly when Bluetooth is active\nand the display is not at full power.</p>\n<p><strong>Power consumption</strong></p>\n<ul>\n<li>0 = 7mA</li>\n<li>0.1 = 12mA</li>\n<li>0.2 = 18mA</li>\n<li>0.5 = 28mA</li>\n<li>0.9 = 40mA (switching overhead)</li>\n<li>1 = 40mA</li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setLCDBrightness"
    },
    "setLCDMode": {
      "!type": "fn(mode: ?)",
      "!doc": "<p>This function can be used to change the way graphics is handled on Bangle.js.</p>\n<p>Available options for <code>Bangle.setLCDMode</code> are:</p>\n<ul>\n<li><code>Bangle.setLCDMode()</code> or <code>Bangle.setLCDMode(&quot;direct&quot;)</code> (the default) - The drawable area is 240x240 16 bit. Unbuffered, so draw calls take effect immediately. Terminal and vertical scrolling work (horizontal scrolling doesn&#39;t).</li>\n<li><code>Bangle.setLCDMode(&quot;doublebuffered&quot;)</code> - The drawable area is 240x160 16 bit, terminal and scrolling will not work. <code>g.flip()</code> must be called for draw operations to take effect.</li>\n<li><code>Bangle.setLCDMode(&quot;120x120&quot;)</code> - The drawable area is 120x120 8 bit, <code>g.getPixel</code>, terminal, and full scrolling work. Uses an offscreen buffer stored on Bangle.js, <code>g.flip()</code> must be called for draw operations to take effect.</li>\n<li><code>Bangle.setLCDMode(&quot;80x80&quot;)</code> - The drawable area is 80x80 8 bit, <code>g.getPixel</code>, terminal, and full scrolling work. Uses an offscreen buffer stored on Bangle.js, <code>g.flip()</code> must be called for draw operations to take effect.</li>\n</ul>\n<p>You can also call <code>Bangle.setLCDMode()</code> to return to normal, unbuffered <code>&quot;direct&quot;</code> mode.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setLCDMode"
    },
    "getLCDMode": {
      "!type": "fn() -> ?",
      "!doc": "<p>The current LCD mode.</p>\n<p>See <code>Bangle.setLCDMode</code> for examples.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_getLCDMode"
    },
    "setLCDOffset": {
      "!type": "fn(y: number)",
      "!doc": "<p>This can be used to move the displayed memory area up or down temporarily. It&#39;s\nused for displaying notifications while keeping the main display contents\nintact.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setLCDOffset"
    },
    "setLCDTimeout": {
      "!type": "fn(isOn: number)",
      "!doc": "<p>This function can be used to turn Bangle.js&#39;s LCD power saving on or off.</p>\n<p>With power saving off, the display will remain in the state you set it with <code>Bangle.setLCDPower</code>.</p>\n<p>With power saving on, the display will turn on if a button is pressed, the watch is turned face up, or the screen is updated. It&#39;ll turn off automatically after the given timeout.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setLCDTimeout"
    },
    "setPollInterval": {
      "!type": "fn(interval: number)",
      "!doc": "<p>Set how often the watch should poll for new acceleration/gyro data and kick the Watchdog timer. It isn&#39;t\nrecommended that you make this interval much larger than 1000ms, but values up to 4000ms are allowed.</p>\n<p>Calling this will set <code>Bangle.setOptions({powerSave: false})</code> - disabling the dynamic adjustment of\npoll interval to save battery power when Bangle.js is stationary.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setPollInterval"
    },
    "setOptions": {
      "!type": "fn(options: ?)",
      "!doc": "<p>Set internal options used for gestures, step counting, etc...</p>\n<ul>\n<li><code>wakeOnBTN1</code> should the LCD turn on when BTN1 is pressed? default = <code>true</code></li>\n<li><code>wakeOnBTN2</code> should the LCD turn on when BTN2 is pressed? default = <code>true</code></li>\n<li><code>wakeOnBTN3</code> should the LCD turn on when BTN3 is pressed? default = <code>true</code></li>\n<li><code>wakeOnFaceUp</code> should the LCD turn on when the watch is turned face up? default = <code>false</code></li>\n<li><code>wakeOnTouch</code> should the LCD turn on when the touchscreen is pressed? default = <code>false</code></li>\n<li><code>wakeOnTwist</code> should the LCD turn on when the watch is twisted? default = <code>true</code></li>\n<li><code>twistThreshold</code>  How much acceleration to register a twist of the watch strap? Can be negative for oppsite direction. default = <code>800</code></li>\n<li><code>twistMaxY</code> Maximum acceleration in Y to trigger a twist (low Y means watch is facing the right way up). default = <code>-800</code></li>\n<li><p><code>twistTimeout</code>  How little time (in ms) must a twist take from low-&gt;high acceleration? default = <code>1000</code></p>\n</li>\n<li><p><code>gestureStartThresh</code> how big a difference before we consider a gesture started? default = <code>sqr(800)</code></p>\n</li>\n<li><code>gestureEndThresh</code> how small a difference before we consider a gesture ended? default = <code>sqr(2000)</code></li>\n<li><code>gestureInactiveCount</code> how many samples do we keep after a gesture has ended? default = <code>4</code></li>\n<li><code>gestureMinLength</code> how many samples must a gesture have before we notify about it? default = <code>10</code>\n*</li>\n<li><code>stepCounterThresholdLow</code> How low must acceleration magnitude squared get before we consider the next rise a step? default = <code>sqr(8192-80)</code></li>\n<li><p><code>stepCounterThresholdHigh</code> How high must acceleration magnitude squared get before we consider it a step? default = <code>sqr(8192+80)</code></p>\n</li>\n<li><p><code>powerSave</code> after a minute of not being moved, Bangle.js will change the accelerometer poll interval down to 800ms (10x accelerometer samples).\n On movement it&#39;ll be raised to the default 80ms. If <code>Bangle.setPollInterval</code> is used this is disabled, and for it to work the poll interval\n must be either 80ms or 800ms. default = <code>true</code></p>\n</li>\n</ul>\n<p>Where accelerations are used they are in internal units, where <code>8192 = 1g</code></p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_setOptions"
    },
    "isLCDOn": {
      "!type": "fn() -> bool",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Bangle_isLCDOn"
    },
    "isCharging": {
      "!type": "fn() -> bool",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Bangle_isCharging"
    },
    "lcdWr": {
      "!type": "fn(cmd: number, data: ?)",
      "!doc": "<p>Writes a command directly to the ST7735 LCD controller</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_lcdWr"
    },
    "getCompass": {
      "!type": "fn() -> ?",
      "!doc": "<p>Get the most recent Magnetometer/Compass reading. Data is in the same format as the <code>Bangle.on(&#39;mag&#39;,</code> event.</p>\n<p>Returns an <code>{x,y,z,dx,dy,dz,heading}</code> object</p>\n<ul>\n<li><code>x/y/z</code> raw x,y,z magnetometer readings</li>\n<li><code>dx/dy/dz</code> readings based on calibration since magnetometer turned on</li>\n<li><code>heading</code> in degrees based on calibrated readings (will be NaN if magnetometer hasn&#39;t been rotated around 360 degrees)</li>\n</ul>\n<p>To get this event you must turn the compass on\nwith <code>Bangle.setCompassPower(1)</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_getCompass"
    },
    "getAccel": {
      "!type": "fn() -> ?",
      "!doc": "<p>Get the most recent accelerometer reading. Data is in the same format as the <code>Bangle.on(&#39;accel&#39;,</code> event.</p>\n<ul>\n<li><code>x</code> is X axis (left-right) in <code>g</code></li>\n<li><code>y</code> is Y axis (up-down) in <code>g</code></li>\n<li><code>z</code> is Z axis (in-out) in <code>g</code></li>\n<li><code>diff</code> is difference between this and the last reading in <code>g</code></li>\n<li><code>mag</code> is the magnitude of the acceleration in <code>g</code></li>\n</ul>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_getAccel"
    },
    "F_BEEPSET": {
      "!type": "bool",
      "!doc": "<p>Feature flag - If true, this Bangle.js firmware reads <code>setting.json</code> and\nmodifies beep &amp; buzz behaviour accordingly (the bootloader\ndoesn&#39;t need to do it).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_F_BEEPSET"
    },
    "dbg": {
      "!type": "fn() -> ?",
      "!doc": "<p>Reads debug info</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_dbg"
    },
    "accelWr": {
      "!type": "fn(reg: number, data: number)",
      "!doc": "<p>Writes a register on the KX023 Accelerometer</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_accelWr"
    },
    "accelRd": {
      "!type": "fn(reg: number, cnt: number) -> ?",
      "!doc": "<p>Reads a register from the KX023 Accelerometer</p>\n<p><strong>Note:</strong> On Espruino 2v06 and before this function only returns a number (<code>cnt</code> is ignored).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_accelRd"
    },
    "compassWr": {
      "!type": "fn(reg: number, data: number)",
      "!doc": "<p>Writes a register on the Magnetometer/Compass</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_compassWr"
    },
    "ioWr": {
      "!type": "fn(mask: number, isOn: number)",
      "!doc": "<p>Changes a pin state on the IO expander</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_ioWr"
    },
    "project": {
      "!type": "fn(latlong: ?) -> ?",
      "!doc": "<p>Perform a Spherical <a href=\"https://en.wikipedia.org/wiki/Web_Mercator_projection\">Web Mercator projection</a>\nof latitude and longitude into <code>x</code> and <code>y</code> coordinates, which are roughly\nequivalent to meters from <code>{lat:0,lon:0}</code>.</p>\n<p>This is the formula used for most online mapping and is a good way\nto compare GPS coordinates to work out the distance between them.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_project"
    },
    "beep": {
      "!type": "fn(time: number, freq: number) -> +Promise",
      "!doc": "<p>Use the piezo speaker to Beep for a certain time period and frequency</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_beep"
    },
    "buzz": {
      "!type": "fn(time: number, strength: number) -> +Promise",
      "!doc": "<p>Use the vibration motor to buzz for a certain time period</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_buzz"
    },
    "off": {
      "!type": "fn()",
      "!doc": "<p>Turn Bangle.js off. It can only be woken by pressing BTN1.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_off"
    },
    "getLogo": {
      "!type": "fn() -> ?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Bangle_getLogo"
    },
    "loadWidgets": {
      "!type": "fn()",
      "!doc": "<p>Load all widgets from flash Storage. Call this once at the beginning\nof your application if you want any on-screen widgets to be loaded.</p>\n<p>They will be loaded into a global <code>WIDGETS</code> array, and\ncan be rendered with <code>Bangle.drawWidgets</code>.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_loadWidgets"
    },
    "drawWidgets": {
      "!type": "fn()",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Bangle_drawWidgets"
    },
    "showLauncher": {
      "!type": "fn()",
      "!doc": "<p>Load the Bangle.js app launcher, which will allow the user\nto select an application to launch.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Bangle_showLauncher"
    }
  },
  "Microbit": {
    "!type": "fn()",
    "!doc": "<p>Class containing <a href=\"https://www.espruino.com/MicroBit\">micro:bit&#39;s</a> utility functions.</p>\n",
    "!url": "http://www.espruino.com/Reference#Microbit",
    "SPEAKER": {
      "!type": "+Pin",
      "!doc": "<p>The micro:bit&#39;s speaker pin</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_SPEAKER"
    },
    "MIC": {
      "!type": "+Pin",
      "!doc": "<p>The micro:bit&#39;s microphone pin</p>\n<p><code>MIC_ENABLE</code> should be set to 1 before using this</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_MIC"
    },
    "MIC_ENABLE": {
      "!type": "+Pin",
      "!doc": "<p>The micro:bit&#39;s microphone enable pin</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_MIC_ENABLE"
    },
    "mag": {
      "!type": "fn() -> ?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Microbit_mag"
    },
    "accel": {
      "!type": "fn() -> ?",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_Microbit_accel"
    },
    "accelWr": {
      "!type": "fn(addr: number, data: number)",
      "!doc": "<p><strong>Note:</strong> This function is only available on the <a href=\"/MicroBit\">BBC micro:bit</a> board</p>\n<p>Write the given value to the accelerometer</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_accelWr"
    },
    "accelOn": {
      "!type": "fn()",
      "!doc": "<p>Turn on the accelerometer, and create <code>Microbit.accel</code> and <code>Microbit.gesture</code> events.</p>\n<p><strong>Note:</strong> The accelerometer is currently always enabled - this code\njust responds to interrupts and reads</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_accelOn"
    },
    "accelOff": {
      "!type": "fn()",
      "!doc": "<p>Turn off events from  the accelerometer (started with <code>Microbit.accelOn</code>)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_accelOff"
    },
    "play": {
      "!type": "fn(waveform: ?, samplesPerSecond: ?, callback: ?)",
      "!doc": "<p>Play a waveform on the Micro:bit&#39;s speaker</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_play"
    },
    "record": {
      "!type": "fn(samplesPerSecond: ?, callback: ?, samples: ?)",
      "!doc": "<p>Records sound from the micro:bit&#39;s onboard microphone and returns the result</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Microbit_record"
    }
  },
  "fs": {
    "!type": "fn()",
    "!doc": "<p>This library handles interfacing with a FAT32 filesystem on an SD card. The API is designed to be similar to node.js&#39;s - However Espruino does not currently support asynchronous file IO, so the functions behave like node.js&#39;s xxxxSync functions. Versions of the functions with &#39;Sync&#39; after them are also provided for compatibility.</p>\n<p>To use this, you must type <code>var fs = require(&#39;fs&#39;)</code> to get access to the library</p>\n<p>See <a href=\"http://www.espruino.com/File+IO\">the page on File IO</a> for more information, and for examples on wiring up an SD card if your device doesn&#39;t come with one.</p>\n<p><strong>Note:</strong> If you want to remove an SD card after you have started using it, you <em>must</em> call <code>E.unmountSD()</code> or you may cause damage to the card.</p>\n",
    "!url": "http://www.espruino.com/Reference#l_fs_undefined",
    "pipe": {
      "!type": "fn(source: ?, destination: ?, options: ?)",
      "!doc": "",
      "!url": "http://www.espruino.com/Reference#l_fs_pipe"
    },
    "readdir": {
      "!type": "fn(path: ?) -> ?",
      "!doc": "<p>List all files in the supplied directory, returning them as an array of strings.</p>\n<p>NOTE: Espruino does not yet support Async file IO, so this function behaves like the &#39;Sync&#39; version.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_readdir"
    },
    "readdirSync": {
      "!type": "fn(path: ?) -> ?",
      "!doc": "<p>List all files in the supplied directory, returning them as an array of strings.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_readdirSync"
    },
    "writeFile": {
      "!type": "fn(path: ?, data: ?) -> bool",
      "!doc": "<p>Write the data to the given file</p>\n<p>NOTE: Espruino does not yet support Async file IO, so this function behaves like the &#39;Sync&#39; version.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_writeFile"
    },
    "writeFileSync": {
      "!type": "fn(path: ?, data: ?) -> bool",
      "!doc": "<p>Write the data to the given file</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_writeFileSync"
    },
    "appendFile": {
      "!type": "fn(path: ?, data: ?) -> bool",
      "!doc": "<p>Append the data to the given file, created a new file if it doesn&#39;t exist</p>\n<p>NOTE: Espruino does not yet support Async file IO, so this function behaves like the &#39;Sync&#39; version.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_appendFile"
    },
    "appendFileSync": {
      "!type": "fn(path: ?, data: ?) -> bool",
      "!doc": "<p>Append the data to the given file, created a new file if it doesn&#39;t exist</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_appendFileSync"
    },
    "readFile": {
      "!type": "fn(path: ?) -> ?",
      "!doc": "<p>Read all data from a file and return as a string</p>\n<p>NOTE: Espruino does not yet support Async file IO, so this function behaves like the &#39;Sync&#39; version.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_readFile"
    },
    "readFileSync": {
      "!type": "fn(path: ?) -> ?",
      "!doc": "<p>Read all data from a file and return as a string.</p>\n<p><strong>Note:</strong> The size of files you can load using this method is limited by the amount of available RAM. To read files a bit at a time, see the <code>File</code> class.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_readFileSync"
    },
    "unlink": {
      "!type": "fn(path: ?) -> bool",
      "!doc": "<p>Delete the given file</p>\n<p>NOTE: Espruino does not yet support Async file IO, so this function behaves like the &#39;Sync&#39; version.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_unlink"
    },
    "unlinkSync": {
      "!type": "fn(path: ?) -> bool",
      "!doc": "<p>Delete the given file</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_unlinkSync"
    },
    "statSync": {
      "!type": "fn(path: ?) -> ?",
      "!doc": "<p>Return information on the given file. This returns an object with the following\nfields:</p>\n<p>size: size in bytes\ndir: a boolean specifying if the file is a directory or not\nmtime: A Date structure specifying the time the file was last modified</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_statSync"
    },
    "mkdir": {
      "!type": "fn(path: ?) -> bool",
      "!doc": "<p>Create the directory</p>\n<p>NOTE: Espruino does not yet support Async file IO, so this function behaves like the &#39;Sync&#39; version.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_mkdir"
    },
    "mkdirSync": {
      "!type": "fn(path: ?) -> bool",
      "!doc": "<p>Create the directory</p>\n",
      "!url": "http://www.espruino.com/Reference#l_fs_mkdirSync"
    }
  },
  "File": {
    "!type": "fn()",
    "!doc": "<p>This is the File object - it allows you to stream data to and from files (As opposed to the <code>require(&#39;fs&#39;).readFile(..)</code> style functions that read an entire file).</p>\n<p>To create a File object, you must type <code>var fd = E.openFile(&#39;filepath&#39;,&#39;mode&#39;)</code> - see <a href=\"#l_E_openFile\">E.openFile</a> for more information.</p>\n<p><strong>Note:</strong> If you want to remove an SD card after you have started using it, you <em>must</em> call <code>E.unmountSD()</code> or you may cause damage to the card.</p>\n",
    "!url": "http://www.espruino.com/Reference#File",
    "prototype": {
      "close": {
        "!type": "fn()",
        "!doc": "<p>Close an open file.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_File_close"
      },
      "write": {
        "!type": "fn(buffer: ?) -> number",
        "!doc": "<p>Write data to a file.</p>\n<p><strong>Note:</strong> By default this function flushes all changes to the\nSD card, which makes it slow (but also safe!). You can use\n<code>E.setFlags({unsyncFiles:1})</code> to disable this behaviour and\nreally speed up writes - but then you must be sure to close\nall files you are writing before power is lost or you will\ncause damage to your SD card&#39;s filesystem.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_File_write"
      },
      "read": {
        "!type": "fn(length: number) -> ?",
        "!doc": "<p>Read data in a file in byte size chunks</p>\n",
        "!url": "http://www.espruino.com/Reference#l_File_read"
      },
      "skip": {
        "!type": "fn(nBytes: number)",
        "!doc": "<p>Skip the specified number of bytes forward in the file</p>\n",
        "!url": "http://www.espruino.com/Reference#l_File_skip"
      },
      "seek": {
        "!type": "fn(nBytes: number)",
        "!doc": "<p>Seek to a certain position in the file</p>\n",
        "!url": "http://www.espruino.com/Reference#l_File_seek"
      },
      "pipe": {
        "!type": "fn(destination: ?, options: ?)",
        "!doc": "<p>Pipe this file to a stream (an object with a &#39;write&#39; method)</p>\n",
        "!url": "http://www.espruino.com/Reference#l_File_pipe"
      }
    }
  },
  "Terminal": {
    "!type": "+Serial",
    "!doc": "<p>A simple VT100 terminal emulator.</p>\n<p>When data is sent to the <code>Terminal</code> object, <code>Graphics.getInstance()</code>\nis called and if an instance of <code>Graphics</code> is found then characters\nare written to it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_Terminal"
  },
  "Graphics": {
    "!type": "fn()",
    "!doc": "<p>This class provides Graphics operations that can be applied to a surface.</p>\n<p>Use Graphics.createXXX to create a graphics object that renders in the way you want. See <a href=\"https://www.espruino.com/Graphics\">the Graphics page</a> for more information.</p>\n<p><strong>Note:</strong> On boards that contain an LCD, there is a built-in &#39;LCD&#39; object of type Graphics. For instance to draw a line you&#39;d type: <code>LCD.drawLine(0,0,100,100)</code></p>\n",
    "!url": "http://www.espruino.com/Reference#Graphics",
    "prototype": {
      "flip": {
        "!type": "fn(all: bool)",
        "!doc": "<p>On instances of graphics that drive a display with\nan offscreen buffer, calling this function will\ncopy the contents of the offscreen buffer to the\nscreen.</p>\n<p>Call this when you have drawn something to Graphics\nand you want it shown on the screen.</p>\n<p>If a display does not have an offscreen buffer,\nit may not have a <code>g.flip()</code> method.</p>\n<p>On Bangle.js, there are different graphics modes\nchosen with <code>Bangle.setLCDMode()</code>. The default mode\nis unbuffered and in this mode <code>g.flip()</code> does not\naffect the screen contents, however it will cause the\nscreen to light up if it was previously off due\nto inactivity.</p>\n<p>On some devices, this command will attempt to\nonly update the areas of the screen that have\nchanged in order to increase speed. If you have\naccessed the <code>Graphics.buffer</code> directly then you\nmay need to use <code>Graphics.flip(true)</code> to force\na full update of the screen.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_flip"
      },
      "getWidth": {
        "!type": "fn() -> number",
        "!doc": "<p>The width of the LCD</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getWidth"
      },
      "getHeight": {
        "!type": "fn() -> number",
        "!doc": "<p>The height of the LCD</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getHeight"
      },
      "reset": {
        "!type": "fn() -> +Graphics",
        "!doc": "<p>Reset the state of Graphics to the defaults (eg. Color, Font, etc)\nthat would have been used when Graphics was initialised.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_reset"
      },
      "clear": {
        "!type": "fn(reset: bool) -> +Graphics",
        "!doc": "<p>Clear the LCD with the Background Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_clear"
      },
      "fillRect": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Fill a rectangular area in the Foreground Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_fillRect"
      },
      "clearRect": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Fill a rectangular area in the Background Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_clearRect"
      },
      "drawRect": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Draw an unfilled rectangle 1px wide in the Foreground Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawRect"
      },
      "fillCircle": {
        "!type": "fn(x: number, y: number, rad: number) -> +Graphics",
        "!doc": "<p>Draw a filled circle in the Foreground Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_fillCircle"
      },
      "drawCircle": {
        "!type": "fn(x: number, y: number, rad: number) -> +Graphics",
        "!doc": "<p>Draw an unfilled circle 1px wide in the Foreground Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawCircle"
      },
      "fillEllipse": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Draw a filled ellipse in the Foreground Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_fillEllipse"
      },
      "drawEllipse": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Draw an ellipse in the Foreground Color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawEllipse"
      },
      "getPixel": {
        "!type": "fn(x: number, y: number) -> number",
        "!doc": "<p>Get a pixel&#39;s color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getPixel"
      },
      "setPixel": {
        "!type": "fn(x: number, y: number, col: ?) -> +Graphics",
        "!doc": "<p>Set a pixel&#39;s color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setPixel"
      },
      "setColor": {
        "!type": "fn(r: ?, g: ?, b: ?) -> +Graphics",
        "!doc": "<p>Set the color to use for subsequent drawing operations.</p>\n<p>If just <code>r</code> is specified as an integer, the numeric value will be written directly into a pixel. eg. On a 24 bit <code>Graphics</code> instance you set bright blue with either <code>g.setColor(0,0,1)</code> or <code>g.setColor(0x0000FF)</code>.</p>\n<p>A good shortcut to ensure you get white on all platforms is to use <code>g.setColor(-1)</code></p>\n<p>The mapping is as follows:</p>\n<ul>\n<li>32 bit: <code>r,g,b</code> =&gt; <code>0xFFrrggbb</code></li>\n<li>24 bit: <code>r,g,b</code> =&gt; <code>0xrrggbb</code></li>\n<li>16 bit: <code>r,g,b</code> =&gt; <code>0brrrrrggggggbbbbb</code> (RGB565)</li>\n<li>Other bpp: <code>r,g,b</code> =&gt; white if <code>r+g+b &gt; 50%</code>, otherwise black (use <code>r</code> on its own as an integer)</li>\n</ul>\n<p>If you specified <code>color_order</code> when creating the <code>Graphics</code> instance, <code>r</code>,<code>g</code> and <code>b</code> will be swapped as you specified.</p>\n<p><strong>Note:</strong> On devices with low flash memory, <code>r</code> <strong>must</strong> be an integer representing the color in the current bit depth. It cannot\nbe a floating point value, and <code>g</code> and <code>b</code> are ignored.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setColor"
      },
      "setBgColor": {
        "!type": "fn(r: ?, g: ?, b: ?) -> +Graphics",
        "!doc": "<p>Set the background color to use for subsequent drawing operations.</p>\n<p>See <code>Graphics.setColor</code> for more information on the mapping of <code>r</code>, <code>g</code>, and <code>b</code> to pixel values.</p>\n<p><strong>Note:</strong> On devices with low flash memory, <code>r</code> <strong>must</strong> be an integer representing the color in the current bit depth. It cannot\nbe a floating point value, and <code>g</code> and <code>b</code> are ignored.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setBgColor"
      },
      "getColor": {
        "!type": "fn() -> number",
        "!doc": "<p>Get the color to use for subsequent drawing operations</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getColor"
      },
      "getBgColor": {
        "!type": "fn() -> number",
        "!doc": "<p>Get the background color to use for subsequent drawing operations</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getBgColor"
      },
      "setClipRect": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>This sets the &#39;clip rect&#39; that subsequent drawing operations are clipped to\nsit between.</p>\n<p>These values are inclusive - eg <code>g.setClipRect(1,0,5,0)</code> will ensure that only\npixel rows 1,2,3,4,5 are touched on column 0.</p>\n<p><strong>Note:</strong> For maximum flexibility, the values here are not range checked. For normal\nuse, X and Y should be between 0 and <code>getWidth</code>/<code>getHeight</code>.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setClipRect"
      },
      "setFontBitmap": {
        "!type": "fn() -> +Graphics",
        "!doc": "<p>Make subsequent calls to <code>drawString</code> use the built-in 4x6 pixel bitmapped Font</p>\n<p>It is recommended that you use <code>Graphics.setFont(&quot;4x6&quot;)</code> for more flexibility.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setFontBitmap"
      },
      "setFontVector": {
        "!type": "fn(size: number) -> +Graphics",
        "!doc": "<p>Make subsequent calls to <code>drawString</code> use a Vector Font of the given height.</p>\n<p>It is recommended that you use <code>Graphics.setFont(&quot;Vector&quot;, size)</code> for more flexibility.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setFontVector"
      },
      "setFontCustom": {
        "!type": "fn(bitmap: ?, firstChar: number, width: ?, height: number) -> +Graphics",
        "!doc": "<p>Make subsequent calls to <code>drawString</code> use a Custom Font of the given height. See the <a href=\"http://www.espruino.com/Fonts\">Fonts page</a> for more\ninformation about custom fonts and how to create them.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setFontCustom"
      },
      "setFontAlign": {
        "!type": "fn(x: number, y: number, rotation: number) -> +Graphics",
        "!doc": "<p>Set the alignment for subsequent calls to <code>drawString</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setFontAlign"
      },
      "setFont": {
        "!type": "fn(name: ?, size: number) -> +Graphics",
        "!doc": "<p>Set the font by name, eg &quot;4x6&quot;, or &quot;Vector12&quot;.</p>\n<p>For bitmap fonts you can also specify a size multiplier, for example <code>g.setFont(&quot;4x6&quot;,2)</code> will double the size of the standard 4x6 bitmap font to 8x12.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setFont"
      },
      "getFont": {
        "!type": "fn() -> +String",
        "!doc": "<p>Get the font by name - can be saved and used with <code>Graphics.setFont</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getFont"
      },
      "getFonts": {
        "!type": "fn() -> +Array",
        "!doc": "<p>Return an array of all fonts currently in the Graphics library.</p>\n<p><strong>Note:</strong> Vector fonts are specified as <code>Vector#</code> where <code>#</code> is the font height. As there\nare effectively infinite fonts, just <code>Vector</code> is included in the list.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getFonts"
      },
      "getFontHeight": {
        "!type": "fn() -> number",
        "!doc": "<p>Return the height in pixels of the current font</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getFontHeight"
      },
      "drawString": {
        "!type": "fn(str: ?, x: number, y: number, solid: bool) -> +Graphics",
        "!doc": "<p>Draw a string of text in the current font</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawString"
      },
      "stringWidth": {
        "!type": "fn(str: ?) -> number",
        "!doc": "<p>Return the size in pixels of a string of text in the current font</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_stringWidth"
      },
      "drawLine": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Draw a line between x1,y1 and x2,y2 in the current foreground color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawLine"
      },
      "drawLineAA": {
        "!type": "fn(x1: number, y1: number, x2: number, y2: number) -> +Graphics",
        "!doc": "<p>Draw a line between x1,y1 and x2,y2 in the current foreground color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawLineAA"
      },
      "lineTo": {
        "!type": "fn(x: number, y: number) -> +Graphics",
        "!doc": "<p>Draw a line from the last position of lineTo or moveTo to this position</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_lineTo"
      },
      "moveTo": {
        "!type": "fn(x: number, y: number) -> +Graphics",
        "!doc": "<p>Move the cursor to a position - see lineTo</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_moveTo"
      },
      "drawPoly": {
        "!type": "fn(poly: ?, closed: bool) -> +Graphics",
        "!doc": "<p>Draw a polyline (lines between each of the points in <code>poly</code>) in the current foreground color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawPoly"
      },
      "drawPolyAA": {
        "!type": "fn(poly: ?, closed: bool) -> +Graphics",
        "!doc": "<p>Draw an <strong>antialiased</strong> polyline (lines between each of the points in <code>poly</code>) in the current foreground color</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_drawPolyAA"
      },
      "setRotation": {
        "!type": "fn(rotation: number, reflect: bool) -> +Graphics",
        "!doc": "<p>Set the current rotation of the graphics device.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_setRotation"
      },
      "asImage": {
        "!type": "fn(type: ?) -> ?",
        "!doc": "<p>Return this Graphics object as an Image that can be used with <code>Graphics.drawImage</code>.\nCheck out <a href=\"http://www.espruino.com/Graphics#images-bitmaps\">the Graphics reference page</a>\nfor more information on images.</p>\n<p>Will return undefined if data can&#39;t be allocated for the image.</p>\n<p>The image data itself will be referenced rather than copied if:</p>\n<ul>\n<li>An image <code>object</code> was requested (not <code>string</code>)</li>\n<li>The Graphics instance was created with <code>Graphics.createArrayBuffer</code></li>\n<li>Is 8 bpp <em>OR</em> the <code>{msb:true}</code> option was given</li>\n<li>No other format options (zigzag/etc) were given</li>\n</ul>\n<p>Otherwise data will be copied, which takes up more space and\nmay be quite slow.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_asImage"
      },
      "getModified": {
        "!type": "fn(reset: bool) -> ?",
        "!doc": "<p>Return the area of the Graphics canvas that has been modified, and optionally clear\nthe modified area to 0.</p>\n<p>For instance if <code>g.setPixel(10,20)</code> was called, this would return <code>{x1:10, y1:20, x2:10, y2:20}</code></p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_getModified"
      },
      "scroll": {
        "!type": "fn(x: number, y: number) -> +Graphics",
        "!doc": "<p>Scroll the contents of this graphics in a certain direction. The remaining area\nis filled with the background color.</p>\n<p>Note: This uses repeated pixel reads and writes, so will not work on platforms that\ndon&#39;t support pixel reads.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_scroll"
      },
      "asBMP": {
        "!type": "fn() -> ?",
        "!doc": "<p>Create a Windows BMP file from this Graphics instance, and return it as a String.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_asBMP"
      },
      "asURL": {
        "!type": "fn() -> ?",
        "!doc": "<p>Create a URL of the form <code>data:image/bmp;base64,...</code> that can be pasted into the browser.</p>\n<p>The Espruino Web IDE can detect this data on the console and render the image inline automatically.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_asURL"
      },
      "dump": {
        "!type": "fn()",
        "!doc": "<p>Output this image as a bitmap URL. The Espruino Web IDE can detect the data on the console and render the image inline automatically.</p>\n<p>This is identical to <code>console.log(g.asURL())</code> - it is just a convenient function for easy debugging.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_dump"
      },
      "quadraticBezier": {
        "!type": "fn(arr: ?, options: ?) -> ?",
        "!doc": "<p>Calculate the square area under a Bezier curve.</p>\n<p> x0,y0: start point\n x1,y1: control point\n y2,y2: end point</p>\n<p> Max 10 points without start point.</p>\n",
        "!url": "http://www.espruino.com/Reference#l_Graphics_quadraticBezier"
      }
    },
    "getInstance": {
      "!type": "fn() -> ?",
      "!doc": "<p>On devices like Pixl.js or HYSTM boards that contain a built-in display\nthis will return an instance of the graphics class that can be used to\naccess that display.</p>\n<p>Internally, this is stored as a member called <code>gfx</code> inside the &#39;hiddenRoot&#39;.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Graphics_getInstance"
    },
    "createArrayBuffer": {
      "!type": "fn(width: number, height: number, bpp: number, options: ?) -> +Graphics",
      "!doc": "<p>Create a Graphics object that renders to an Array Buffer. This will have a field called &#39;buffer&#39; that can get used to get at the buffer itself</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Graphics_createArrayBuffer"
    },
    "createCallback": {
      "!type": "fn(width: number, height: number, bpp: number, callback: ?) -> +Graphics",
      "!doc": "<p>Create a Graphics object that renders by calling a JavaScript callback function to draw pixels</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Graphics_createCallback"
    },
    "createSDL": {
      "!type": "fn(width: number, height: number, bpp: number) -> +Graphics",
      "!doc": "<p>Create a Graphics object that renders to SDL window (Linux-based devices only)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Graphics_createSDL"
    }
  },
  "Puck": {
    "!type": "fn()",
    "!doc": "<p>Class containing <a href=\"http://www.puck-js.com\">Puck.js&#39;s</a> utility functions.</p>\n",
    "!url": "http://www.espruino.com/Reference#Puck",
    "mag": {
      "!type": "fn() -> ?",
      "!doc": "<p>Turn on the magnetometer, take a single reading, and then turn it off again.</p>\n<p>An object of the form <code>{x,y,z}</code> is returned containing magnetometer readings.\nDue to residual magnetism in the Puck and magnetometer itself, with\nno magnetic field the Puck will not return <code>{x:0,y:0,z:0}</code>.</p>\n<p>Instead, it&#39;s up to you to figure out what the &#39;zero value&#39; is for your\nPuck in your location and to then subtract that from the value returned. If\nyou&#39;re not trying to measure the Earth&#39;s magnetic field then it&#39;s a good idea\nto just take a reading at startup and use that.</p>\n<p>With the aerial at the top of the board, the <code>y</code> reading is vertical, <code>x</code> is\nhorizontal, and <code>z</code> is through the board.</p>\n<p>Readings are in increments of 0.1 micro Tesla (uT). The Earth&#39;s magnetic field\nvaries from around 25-60 uT, so the reading will vary by 250 to 600 depending\non location.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_mag"
    },
    "magTemp": {
      "!type": "fn() -> number",
      "!doc": "<p>Turn on the magnetometer, take a single temperature reading from the MAG3110 chip, and then turn it off again.</p>\n<p>(If the magnetometer is already on, this just returns the last reading obtained)</p>\n<p><code>E.getTemperature()</code> uses the microcontroller&#39;s temperature sensor, but this uses the magnetometer&#39;s.</p>\n<p>The reading obtained is an integer (so no decimal places), but the sensitivity is factory trimmed. to 1&deg;C, however the temperature\noffset isn&#39;t - so absolute readings may still need calibrating.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_magTemp"
    },
    "magOff": {
      "!type": "fn()",
      "!doc": "<p>Turn the magnetometer off</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_magOff"
    },
    "magWr": {
      "!type": "fn(reg: number, data: number)",
      "!doc": "<p>Writes a register on the LIS3MDL / MAX3110 Magnetometer. Can be used for configuring advanced functions.</p>\n<p>Check out <a href=\"http://www.espruino.com/Puck.js#on-board-peripherals\">the Puck.js page on the magnetometer</a>\nfor more information and links to modules that use this function.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_magWr"
    },
    "magRd": {
      "!type": "fn(reg: number) -> number",
      "!doc": "<p>Reads a register from the LIS3MDL / MAX3110 Magnetometer. Can be used for configuring advanced functions.</p>\n<p>Check out <a href=\"http://www.espruino.com/Puck.js#on-board-peripherals\">the Puck.js page on the magnetometer</a>\nfor more information and links to modules that use this function.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_magRd"
    },
    "getTemperature": {
      "!type": "fn() -> number",
      "!doc": "<p>On Puck.js v2.0 this will use the on-board PCT2075TP temperature sensor, but on Puck.js the less accurate on-chip Temperature sensor is used.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_getTemperature"
    },
    "accelOff": {
      "!type": "fn()",
      "!doc": "<p>Turn the accelerometer off after it has been turned on by <code>Puck.accelOn()</code>. </p>\n<p>Check out <a href=\"http://www.espruino.com/Puck.js#on-board-peripherals\">the Puck.js page on the accelerometer</a>\nfor more information.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_accelOff"
    },
    "accel": {
      "!type": "fn() -> ?",
      "!doc": "<p>Turn on the accelerometer, take a single reading, and then turn it off again.</p>\n<p>The values reported are the raw values from the chip. In normal configuration:</p>\n<ul>\n<li>accelerometer: full-scale (32768) is 4g, so you need to divide by 8192 to get correctly scaled values</li>\n<li>gyro: full-scale (32768) is 245 dps, so you need to divide by 134 to get correctly scaled values</li>\n</ul>\n<p>If taking more than one reading, we&#39;d suggest you use <code>Puck.accelOn()</code> and the <code>Puck.accel</code> event.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_accel"
    },
    "accelWr": {
      "!type": "fn(reg: number, data: number)",
      "!doc": "<p>Writes a register on the LSM6DS3TR-C Accelerometer. Can be used for configuring advanced functions.</p>\n<p>Check out <a href=\"http://www.espruino.com/Puck.js#on-board-peripherals\">the Puck.js page on the accelerometer</a>\nfor more information and links to modules that use this function.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_accelWr"
    },
    "accelRd": {
      "!type": "fn(reg: number) -> number",
      "!doc": "<p>Reads a register from the LSM6DS3TR-C Accelerometer. Can be used for configuring advanced functions.</p>\n<p>Check out <a href=\"http://www.espruino.com/Puck.js#on-board-peripherals\">the Puck.js page on the accelerometer</a>\nfor more information and links to modules that use this function.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_accelRd"
    },
    "IR": {
      "!type": "fn(data: ?, cathode: +Pin, anode: +Pin)",
      "!doc": "<p>Transmit the given set of IR pulses - data should be an array of pulse times\nin milliseconds (as <code>[on, off, on, off, on, etc]</code>).</p>\n<p>For example <code>Puck.IR(pulseTimes)</code> - see <a href=\"http://www.espruino.com/Puck.js+Infrared\">http://www.espruino.com/Puck.js+Infrared</a>\nfor a full example.</p>\n<p>You can also attach an external LED to Puck.js, in which case\nyou can just execute <code>Puck.IR(pulseTimes, led_cathode, led_anode)</code></p>\n<p>It is also possible to just supply a single pin for IR transmission\nwith <code>Puck.IR(pulseTimes, led_anode)</code> (on 2v05 and above).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_IR"
    },
    "capSense": {
      "!type": "fn(tx: +Pin, rx: +Pin) -> number",
      "!doc": "<p>Capacitive sense - the higher the capacitance, the higher the number returned.</p>\n<p>If called without arguments, a value depending on the capacitance of what is \nattached to pin D11 will be returned. If you attach a length of wire to D11,\nyou&#39;ll be able to see a higher value returned when your hand is near the wire\nthan when it is away.</p>\n<p>You can also supply pins to use yourself, however if you do this then\nthe TX pin must be connected to RX pin and sense plate via a roughly 1MOhm \nresistor.</p>\n<p>When not supplying pins, Puck.js uses an internal resistor between D12(tx)\nand D11(rx).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_capSense"
    },
    "light": {
      "!type": "fn() -> number",
      "!doc": "<p>Return a light value based on the light the red LED is seeing.</p>\n<p><strong>Note:</strong> If called more than 5 times per second, the received light value\nmay not be accurate.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_light"
    },
    "getBatteryPercentage": {
      "!type": "fn() -> number",
      "!doc": "<p>DEPRECATED - Please use <code>E.getBattery()</code> instead.</p>\n<p>Return an approximate battery percentage remaining based on\na normal CR2032 battery (2.8 - 2.2v).</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_getBatteryPercentage"
    },
    "selfTest": {
      "!type": "fn() -> bool",
      "!doc": "<p>Run a self-test, and return true for a pass. This checks for shorts\nbetween pins, so your Puck shouldn&#39;t have anything connected to it.</p>\n<p><strong>Note:</strong> This self-test auto starts if you hold the button on your Puck\ndown while inserting the battery, leave it pressed for 3 seconds (while\nthe green LED is lit) and release it soon after all LEDs turn on. 5\nred blinks is a fail, 5 green is a pass.</p>\n<p>If the self test fails, it&#39;ll set the Puck.js Bluetooth advertising name\nto <code>Puck.js !ERR</code> where ERR is a 3 letter error code.</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Puck_selfTest"
    }
  },
  "Badge": {
    "!type": "fn()",
    "!doc": "<p>Class containing utility functions for accessing IO on the hexagonal badge</p>\n",
    "!url": "http://www.espruino.com/Reference#Badge",
    "capSense": {
      "!type": "fn(corner: number) -> number",
      "!doc": "<p>Capacitive sense - the higher the capacitance, the higher the number returned.</p>\n<p>Supply a corner number between 1 and 6, and an integer value will be returned that is proportional to the capacitance</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Badge_capSense"
    },
    "getBatteryPercentage": {
      "!type": "fn() -> number",
      "!doc": "<p>Return an approximate battery percentage remaining based on\na normal CR2032 battery (2.8 - 2.2v)</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Badge_getBatteryPercentage"
    },
    "setContrast": {
      "!type": "fn(c: number)",
      "!doc": "<p>Set the LCD&#39;s contrast</p>\n",
      "!url": "http://www.espruino.com/Reference#l_Badge_setContrast"
    }
  },
  "Boolean": {
    "!type": "fn(value: ?) -> bool",
    "!doc": "<p>Creates a boolean</p>\n",
    "!url": "http://www.espruino.com/Reference#l_Boolean_Boolean"
  },
  "NaN": {
    "!type": "number",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_NaN"
  },
  "Infinity": {
    "!type": "number",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_Infinity"
  },
  "HIGH": {
    "!type": "number",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_HIGH"
  },
  "LOW": {
    "!type": "number",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_LOW"
  },
  "peek8": {
    "!type": "fn(addr: number, count: number) -> ?",
    "!doc": "<p>Read 8 bits of memory at the given location - DANGEROUS!</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_peek8"
  },
  "poke8": {
    "!type": "fn(addr: number, value: ?)",
    "!doc": "<p>Write 8 bits of memory at the given location - VERY DANGEROUS!</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_poke8"
  },
  "peek16": {
    "!type": "fn(addr: number, count: number) -> ?",
    "!doc": "<p>Read 16 bits of memory at the given location - DANGEROUS!</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_peek16"
  },
  "poke16": {
    "!type": "fn(addr: number, value: ?)",
    "!doc": "<p>Write 16 bits of memory at the given location - VERY DANGEROUS!</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_poke16"
  },
  "peek32": {
    "!type": "fn(addr: number, count: number) -> ?",
    "!doc": "<p>Read 32 bits of memory at the given location - DANGEROUS!</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_peek32"
  },
  "poke32": {
    "!type": "fn(addr: number, value: ?)",
    "!doc": "<p>Write 32 bits of memory at the given location - VERY DANGEROUS!</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_poke32"
  },
  "analogRead": {
    "!type": "fn(pin: +Pin) -> number",
    "!doc": "<p>Get the analog value of the given pin</p>\n<p>This is different to Arduino which only returns an integer between 0 and 1023</p>\n<p>However only pins connected to an ADC will work (see the datasheet)</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset pin&#39;s state to <code>&quot;analog&quot;</code></p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_analogRead"
  },
  "analogWrite": {
    "!type": "fn(pin: +Pin, value: number, options: ?)",
    "!doc": "<p>Set the analog Value of a pin. It will be output using PWM.</p>\n<p>Objects can contain:</p>\n<ul>\n<li><code>freq</code> - pulse frequency in Hz, eg. <code>analogWrite(A0,0.5,{ freq : 10 });</code> - specifying a frequency will force PWM output, even if the pin has a DAC</li>\n<li><code>soft</code> - boolean, If true software PWM is used if hardware is not available.</li>\n<li><p><code>forceSoft</code> - boolean, If true software PWM is used even if hardware PWM or a DAC is available</p>\n<p><strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset pin&#39;s state to <code>&quot;output&quot;</code></p>\n</li>\n</ul>\n",
    "!url": "http://www.espruino.com/Reference#l__global_analogWrite"
  },
  "digitalPulse": {
    "!type": "fn(pin: +Pin, value: bool, time: ?)",
    "!doc": "<p>Pulse the pin with the value for the given time in milliseconds. It uses a hardware timer to produce accurate pulses, and returns immediately (before the pulse has finished). Use <code>digitalPulse(A0,1,0)</code> to wait until a previous pulse has finished.</p>\n<p>eg. <code>digitalPulse(A0,1,5);</code> pulses A0 high for 5ms. <code>digitalPulse(A0,1,[5,2,4]);</code> pulses A0 high for 5ms, low for 2ms, and high for 4ms</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset pin&#39;s state to <code>&quot;output&quot;</code></p>\n<p>digitalPulse is for SHORT pulses that need to be very accurate. If you&#39;re doing anything over a few milliseconds, use setTimeout instead.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_digitalPulse"
  },
  "digitalWrite": {
    "!type": "fn(pin: +Pin, value: number)",
    "!doc": "<p>Set the digital value of the given pin.</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset pin&#39;s state to <code>&quot;output&quot;</code></p>\n<p>If pin argument is an array of pins (eg. <code>[A2,A1,A0]</code>) the value argument will be treated\nas an array of bits where the last array element is the least significant bit.</p>\n<p>In this case, pin values are set least significant bit first (from the right-hand side\nof the array of pins). This means you can use the same pin multiple times, for\nexample <code>digitalWrite([A1,A1,A0,A0],0b0101)</code> would pulse A0 followed by A1.</p>\n<p>If the pin argument is an object with a <code>write</code> method, the <code>write</code> method will\nbe called with the value passed through.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_digitalWrite"
  },
  "digitalRead": {
    "!type": "fn(pin: +Pin) -> number",
    "!doc": "<p>Get the digital value of the given pin.</p>\n<p> <strong>Note:</strong> if you didn&#39;t call <code>pinMode</code> beforehand then this function will also reset pin&#39;s state to <code>&quot;input&quot;</code></p>\n<p>If the pin argument is an array of pins (eg. <code>[A2,A1,A0]</code>) the value returned will be an number where\nthe last array element is the least significant bit, for example if <code>A0=A1=1</code> and <code>A2=0</code>, <code>digitalRead([A2,A1,A0]) == 0b011</code></p>\n<p>If the pin argument is an object with a <code>read</code> method, the <code>read</code> method will be called and the integer value it returns\npassed back.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_digitalRead"
  },
  "pinMode": {
    "!type": "fn(pin: +Pin, mode: ?, automatic: bool)",
    "!doc": "<p>Set the mode of the given pin.</p>\n<ul>\n<li><code>auto</code>/<code>undefined</code> - Don&#39;t change state, but allow <code>digitalWrite</code>/etc to automatically change state as appropriate</li>\n<li><code>analog</code> - Analog input</li>\n<li><code>input</code> - Digital input</li>\n<li><code>input_pullup</code> - Digital input with internal ~40k pull-up resistor</li>\n<li><code>input_pulldown</code> - Digital input with internal ~40k pull-down resistor</li>\n<li><code>output</code> - Digital output</li>\n<li><code>opendrain</code> - Digital output that only ever pulls down to 0v. Sending a logical <code>1</code> leaves the pin open circuit</li>\n<li><code>opendrain_pullup</code> - Digital output that pulls down to 0v. Sending a logical <code>1</code> enables internal ~40k pull-up resistor</li>\n<li><code>af_output</code> - Digital output from built-in peripheral</li>\n<li><p><code>af_opendrain</code> - Digital output from built-in peripheral that only ever pulls down to 0v. Sending a logical <code>1</code> leaves the pin open circuit</p>\n<p><strong>Note:</strong> <code>digitalRead</code>/<code>digitalWrite</code>/etc set the pin mode automatically <em>unless</em> <code>pinMode</code> has been called first.\nIf you want <code>digitalRead</code>/etc to set the pin mode automatically after you have called <code>pinMode</code>, simply call it again\nwith no mode argument (<code>pinMode(pin)</code>), <code>auto</code> as the argument (<code>pinMode(pin, &quot;auto&quot;)</code>), or with the 3rd &#39;automatic&#39;\nargument set to true (<code>pinMode(pin, &quot;output&quot;, true)</code>).</p>\n</li>\n</ul>\n",
    "!url": "http://www.espruino.com/Reference#l__global_pinMode"
  },
  "getPinMode": {
    "!type": "fn(pin: +Pin) -> ?",
    "!doc": "<p>Return the current mode of the given pin. See <code>pinMode</code> for more information on returned values.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_getPinMode"
  },
  "clearWatch": {
    "!type": "fn(id: ?)",
    "!doc": "<p>Clear the Watch that was created with setWatch. If no parameter is supplied, all watches will be removed.</p>\n<p>To avoid accidentally deleting all Watches, if a parameter is supplied but is <code>undefined</code> then an Exception will be thrown.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_clearWatch"
  },
  "global": {
    "!type": "?",
    "!doc": "<p>A reference to the global scope, where everything is defined.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_global"
  },
  "setBusyIndicator": {
    "!type": "fn(pin: +Pin)",
    "!doc": "<p>When Espruino is busy, set the pin specified here high. Set this to undefined to disable the feature.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_setBusyIndicator"
  },
  "setSleepIndicator": {
    "!type": "fn(pin: +Pin)",
    "!doc": "<p>When Espruino is asleep, set the pin specified here low (when it&#39;s awake, set it high). Set this to undefined to disable the feature.</p>\n<p>Please see <a href=\"http://www.espruino.com/Power+Consumption\">http://www.espruino.com/Power+Consumption</a> for more details on this.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_setSleepIndicator"
  },
  "setDeepSleep": {
    "!type": "fn(sleep: bool)",
    "!doc": "<p>Set whether we can enter deep sleep mode, which reduces power consumption to around 100uA. This only works on STM32 Espruino Boards (nRF52 boards sleep automatically).</p>\n<p>Please see <a href=\"http://www.espruino.com/Power+Consumption\">http://www.espruino.com/Power+Consumption</a> for more details on this.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_setDeepSleep"
  },
  "trace": {
    "!type": "fn(root: ?)",
    "!doc": "<p>Output debugging information</p>\n<p>Note: This is not included on boards with low amounts of flash memory, or the Espruino board.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_trace"
  },
  "dump": {
    "!type": "fn()",
    "!doc": "<p>Output current interpreter state in a text form such that it can be copied to a new device</p>\n<p>Espruino keeps its current state in RAM (even if the function code is stored in Flash). When you type <code>dump()</code> it dumps the current state of code in RAM plus the hardware state, then if there&#39;s code saved in flash it writes &quot;// Code saved with E.setBootCode&quot; and dumps that too.</p>\n<p><strong>Note:</strong> &#39;Internal&#39; functions are currently not handled correctly. You will need to recreate these in the <code>onInit</code> function.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_dump"
  },
  "load": {
    "!type": "fn(filename: ?)",
    "!doc": "<p>Restart and load the program out of flash - this has an effect similar to\ncompletely rebooting Espruino (power off/power on), but without actually\nperforming a full reset of the hardware.</p>\n<p>This command only executes when the Interpreter returns to the Idle state - for\ninstance <code>a=1;load();a=2;</code> will still leave &#39;a&#39; as undefined (or what it was\nset to in the saved program).</p>\n<p>Espruino will resume from where it was when you last typed <code>save()</code>.\nIf you want code to be executed right after loading (for instance to initialise\ndevices connected to Espruino), add an <code>init</code> event handler to <code>E</code> with\n<code>E.on(&#39;init&#39;, function() { ... your_code ... });</code>. This will then be automatically\nexecuted by Espruino every time it starts.</p>\n<p><strong>If you specify a filename in the argument then that file will be loaded\nfrom Storage after reset</strong> in much the same way as calling <code>reset()</code> then <code>eval(require(&quot;Storage&quot;).read(filename))</code></p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_load"
  },
  "save": {
    "!type": "fn()",
    "!doc": "<p>Save the state of the interpreter into flash (including the results of calling\n<code>setWatch</code>, <code>setInterval</code>, <code>pinMode</code>, and any listeners). The state will then be loaded automatically\n every time Espruino powers on or is hard-reset. To see what will get saved you can call <code>dump()</code>.</p>\n<p><strong>Note:</strong> If you set up intervals/etc in <code>onInit()</code> and you have already called <code>onInit</code>\nbefore running <code>save()</code>, when Espruino resumes there will be two copies of your intervals -\nthe ones from before the save, and the ones from after - which may cause you problems.</p>\n<p>For more information about this and other options for saving, please see\nthe <a href=\"https://www.espruino.com/Saving\">Saving code on Espruino</a> page.</p>\n<p>This command only executes when the Interpreter returns to the Idle state - for\ninstance <code>a=1;save();a=2;</code> will save &#39;a&#39; as 2.</p>\n<p>When Espruino powers on, it will resume from where it was when you typed <code>save()</code>.\nIf you want code to be executed right after loading (for instance to initialise\ndevices connected to Espruino), add a function called <code>onInit</code>, or add a <code>init</code>\nevent handler to <code>E</code> with <code>E.on(&#39;init&#39;, function() { ... your_code ... });</code>.\nThis will then be automatically executed by Espruino every time it starts.</p>\n<p>In order to stop the program saved with this command being loaded automatically,\ncheck out <a href=\"https://www.espruino.com/Troubleshooting#espruino-stopped-working-after-i-typed-save-\">the Troubleshooting guide</a></p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_save"
  },
  "reset": {
    "!type": "fn(clearFlash: bool)",
    "!doc": "<p>Reset the interpreter - clear program memory in RAM, and do not load a saved program from flash. This does NOT reset the underlying hardware (which allows you to reset the device without it disconnecting from USB).</p>\n<p>This command only executes when the Interpreter returns to the Idle state - for instance <code>a=1;reset();a=2;</code> will still leave &#39;a&#39; as undefined.</p>\n<p>The safest way to do a full reset is to hit the reset button.</p>\n<p>If <code>reset()</code> is called with no arguments, it will reset the board&#39;s state in\nRAM but will not reset the state in flash. When next powered on (or when\n<code>load()</code> is called) the board will load the previously saved code.</p>\n<p>Calling <code>reset(true)</code> will cause <em>all saved code in flash memory to\nbe cleared as well</em>.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_reset"
  },
  "print": {
    "!type": "fn(text: ?)",
    "!doc": "<p>Print the supplied string(s) to the console</p>\n<p> <strong>Note:</strong> If you&#39;re connected to a computer (not a wall adaptor) via USB but <strong>you are not running a terminal app</strong> then when you print data Espruino may pause execution and wait until the computer requests the data it is trying to print.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_print"
  },
  "edit": {
    "!type": "fn(funcName: ?)",
    "!doc": "<p>Fill the console with the contents of the given function, so you can edit it.</p>\n<p>NOTE: This is a convenience function - it will not edit &#39;inner functions&#39;. For that, you must edit the &#39;outer function&#39; and re-execute it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_edit"
  },
  "echo": {
    "!type": "fn(echoOn: bool)",
    "!doc": "<p>Should Espruino echo what you type back to you? true = yes (Default), false = no. When echo is off, the result of executing a command is not returned. Instead, you must use &#39;print&#39; to send output.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_echo"
  },
  "getTime": {
    "!type": "fn() -> number",
    "!doc": "<p>Return the current system time in Seconds (as a floating point number)</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_getTime"
  },
  "getSerial": {
    "!type": "fn() -> ?",
    "!doc": "<p>Get the serial number of this board</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_getSerial"
  },
  "clearInterval": {
    "!type": "fn(id: ?)",
    "!doc": "<p>Clear the Interval that was created with <code>setInterval</code>, for example:</p>\n<p><code>var id = setInterval(function () { print(&#39;foo&#39;); }, 1000);</code></p>\n<p><code>clearInterval(id);</code></p>\n<p>If no argument is supplied, all timeouts and intervals are stopped.</p>\n<p>To avoid accidentally deleting all Intervals, if a parameter is supplied but is <code>undefined</code> then an Exception will be thrown.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_clearInterval"
  },
  "clearTimeout": {
    "!type": "fn(id: ?)",
    "!doc": "<p>Clear the Timeout that was created with <code>setTimeout</code>, for example:</p>\n<p><code>var id = setTimeout(function () { print(&#39;foo&#39;); }, 1000);</code></p>\n<p><code>clearTimeout(id);</code></p>\n<p>If no argument is supplied, all timeouts and intervals are stopped.</p>\n<p>To avoid accidentally deleting all Timeouts, if a parameter is supplied but is <code>undefined</code> then an Exception will be thrown.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_clearTimeout"
  },
  "changeInterval": {
    "!type": "fn(id: ?, time: number)",
    "!doc": "<p>Change the Interval on a callback created with <code>setInterval</code>, for example:</p>\n<p><code>var id = setInterval(function () { print(&#39;foo&#39;); }, 1000); // every second</code></p>\n<p><code>changeInterval(id, 1500); // now runs every 1.5 seconds</code></p>\n<p>This takes effect immediately and resets the timeout, so in the example above,\nregardless of when you call <code>changeInterval</code>, the next interval will occur 1500ms\nafter it.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_changeInterval"
  },
  "eval": {
    "!type": "fn(code: ?) -> ?",
    "!doc": "<p>Evaluate a string containing JavaScript code</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_eval"
  },
  "parseInt": {
    "!type": "fn(string: ?, radix: ?) -> ?",
    "!doc": "<p>Convert a string representing a number into an integer</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_parseInt"
  },
  "parseFloat": {
    "!type": "fn(string: ?) -> number",
    "!doc": "<p>Convert a string representing a number into an float</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_parseFloat"
  },
  "isFinite": {
    "!type": "fn(x: ?) -> bool",
    "!doc": "<p>Is the parameter a finite num,ber or not? If needed, the parameter is first converted to a number.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_isFinite"
  },
  "isNaN": {
    "!type": "fn(x: ?) -> bool",
    "!doc": "<p>Whether the x is NaN (Not a Number) or not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_isNaN"
  },
  "btoa": {
    "!type": "fn(binaryData: ?) -> ?",
    "!doc": "<p>Encode the supplied string (or array) into a base64 string</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_btoa"
  },
  "atob": {
    "!type": "fn(base64Data: ?) -> ?",
    "!doc": "<p>Decode the supplied base64 string into a normal string</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_atob"
  },
  "encodeURIComponent": {
    "!type": "fn(str: ?) -> ?",
    "!doc": "<p>Convert a string with any character not alphanumeric or <code>- _ . ! ~ * &#39; ( )</code> converted to the form <code>%XY</code> where <code>XY</code> is its hexadecimal representation</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_encodeURIComponent"
  },
  "decodeURIComponent": {
    "!type": "fn(str: ?) -> ?",
    "!doc": "<p>Convert any groups of characters of the form &#39;%ZZ&#39;, into characters with hex code &#39;0xZZ&#39;</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_decodeURIComponent"
  },
  "SDA": {
    "!type": "+Pin",
    "!doc": "<p>The pin marked SDA on the Arduino pin footprint. This is connected directly to pin A4.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_SDA"
  },
  "SCL": {
    "!type": "+Pin",
    "!doc": "<p>The pin marked SDA on the Arduino pin footprint. This is connected directly to pin A5.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_SCL"
  },
  "MOS1": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_MOS1"
  },
  "MOS2": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_MOS2"
  },
  "MOS3": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_MOS3"
  },
  "MOS4": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_MOS4"
  },
  "IOEXT0": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_IOEXT0"
  },
  "IOEXT1": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_IOEXT1"
  },
  "IOEXT2": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_IOEXT2"
  },
  "IOEXT3": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_IOEXT3"
  },
  "VIBRATE": {
    "!type": "+Pin",
    "!doc": "<p>The Bangle.js&#39;s vibration motor.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_VIBRATE"
  },
  "LED": {
    "!type": "?",
    "!doc": "<p>On most Espruino board there are LEDs, in which case <code>LED</code> will be an actual Pin.</p>\n<p>On Bangle.js there are no LEDs, so to remain compatible with example code that might\nexpect an LED, this is an object that behaves like a pin, but which just displays\na circle on the display</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_LED"
  },
  "LED1": {
    "!type": "?",
    "!doc": "<p>On most Espruino board there are LEDs, in which case <code>LED1</code> will be an actual Pin.</p>\n<p>On Bangle.js there are no LEDs, so to remain compatible with example code that might\nexpect an LED, this is an object that behaves like a pin, but which just displays\na circle on the display</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_LED1"
  },
  "LED2": {
    "!type": "?",
    "!doc": "<p>On most Espruino board there are LEDs, in which case <code>LED2</code> will be an actual Pin.</p>\n<p>On Bangle.js there are no LEDs, so to remain compatible with example code that might\nexpect an LED, this is an object that behaves like a pin, but which just displays\na circle on the display</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_LED2"
  },
  "BTN1": {
    "!type": "+Pin",
    "!doc": "<p>This is a fake pin, used only for injecting &#39;fake&#39; button press events from the touchscreen</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTN1"
  },
  "BTN2": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_BTN2"
  },
  "BTN3": {
    "!type": "+Pin",
    "!doc": "<p>This is a fake pin, used only for injecting &#39;fake&#39; button press events from the touchscreen</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTN3"
  },
  "BTN": {
    "!type": "+Pin",
    "!doc": "",
    "!url": "http://www.espruino.com/Reference#l__global_BTN"
  },
  "acceleration": {
    "!type": "fn() -> ?",
    "!doc": "<p><strong>Note:</strong> This function is only available on the <a href=\"/MicroBit\">BBC micro:bit</a> board</p>\n<p>Get the current acceleration of the micro:bit from the on-board accelerometer</p>\n<p><strong>This is deprecated.</strong> Please use <code>Microbit.accel</code> instead.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_acceleration"
  },
  "compass": {
    "!type": "fn() -> ?",
    "!doc": "<p><strong>Note:</strong> This function is only available on the <a href=\"/MicroBit\">BBC micro:bit</a> board</p>\n<p>Get the current compass position for the micro:bit from the on-board magnetometer</p>\n<p><strong>This is deprecated.</strong> Please use <code>Microbit.mag</code> instead.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_compass"
  },
  "FET": {
    "!type": "+Pin",
    "!doc": "<p>On Puck.js V2 (not v1.0) this is the pin that controls the FET, for high-powered outputs.</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_FET"
  },
  "BTNA": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to the &#39;A&#39; button. Reads as <code>1</code> when pressed, <code>0</code> when not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTNA"
  },
  "BTNB": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to the &#39;B&#39; button. Reads as <code>1</code> when pressed, <code>0</code> when not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTNB"
  },
  "BTNU": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to the up button. Reads as <code>1</code> when pressed, <code>0</code> when not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTNU"
  },
  "BTND": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to the down button. Reads as <code>1</code> when pressed, <code>0</code> when not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTND"
  },
  "BTNL": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to the left button. Reads as <code>1</code> when pressed, <code>0</code> when not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTNL"
  },
  "BTNR": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to the right button. Reads as <code>1</code> when pressed, <code>0</code> when not</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_BTNR"
  },
  "CORNER1": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to Corner #1</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_CORNER1"
  },
  "CORNER2": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to Corner #2</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_CORNER2"
  },
  "CORNER3": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to Corner #3</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_CORNER3"
  },
  "CORNER4": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to Corner #4</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_CORNER4"
  },
  "CORNER5": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to Corner #5</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_CORNER5"
  },
  "CORNER6": {
    "!type": "+Pin",
    "!doc": "<p>The pin connected to Corner #6</p>\n",
    "!url": "http://www.espruino.com/Reference#l__global_CORNER6"
  }
}
