As with the last commit this rolls up the follwowing, but include the various
review comments on the PR.
- **Documentation changes**. I've added the taks FAQ as a stub new Extension
developer FAQ, and split the old FAQ into a Lua Developer FAQ and a Hardware
FAQ.
- **Tasking I/F**. New `app/task/Makefile`, `app/task/task.c`,
`app/include/task/task.h` and `app/Makefile` as per previous commit. Cascade
changes to `app/driver/uart.c`, `app/include/driver/uart.h`,
`app/user/user_main.c` and `app/modules/node.c`
- **GPIO Rework** to `app/modules/gpio.c` and `pin_map.[hc]`, `platform.[hc]`
in `app/platform`
- **Other Optimisations** Move the `platform_*_exists()` from
`app/platform/common.c` to static inline declarations in `platform.h` as
this generates faster, smaller code. Move lgc.a routines out of iram0.
packed structures in strings. Very useful for network protocol
packing/unpacking. The docs are directly converted from the original.
Review feedback
Fix typo
Fixes:
* Removed spurious \0 bytes being sent to the client in many cases.
* Properly terminated 404 header.
* Now including Content-length: header for index.html (including built-in).
Clients otherwise had to wait for their own timeout before considering
the page load complete, which resulting in an unpleasant sluggish
experience.
* Switched form submission to GET, as iOS sometimes does not include the
body in the same packet as the POST header, which led to the module
not finding the form values.
* Added redirect after form submission to avoid blank-page-in-browser.
* Moved common "enduser_setup" prefix to a lua_pushfstring() to reduce
string literal overhead.
* Replaced cached lua_State* with calls to lua_getstate(), as in other
modules.
* Fixed broken appending of MAC to the SSID.
* Fixed up macro definitions to not break `if` clauses unintentionally.
Enhancements:
* Support for scanning for available WiFi networks, and picking from the list.
* Support for retrieving the current WiFi station status.
* Added "manual" mode, where the module does not (re)configure the AP setup,
nor shut down automatically. Default is still automatic, as before.
* Updated docs for new `enduser_setup.manual()` function.
Having ascertained that the SDK itself has no (zero, zilch, nada) dependencies
on the standard C library, the NodeMCU linker script now puts any and all
libc functions into irom, rather than carefully picking the ones that
were used by NodeMCU some months ago. This should help keep iram free for
the things which really need to be in iram (such as ISRs).