Commit Graph

11 Commits

Author SHA1 Message Date
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
Johny Mattsson 526d21dab4 Major cleanup - c_whatever is finally history. (#2838)
The PR removed the bulk of non-newlib headers from the NodeMCU source base.  
app/libc has now been cut down to the bare minimum overrides to shadow the 
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been 
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in 
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're 
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately, 
but it's no worse than it has been before.

This enables our source files to compile successfully using the standard header files, 
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and 
memwhatever()s. These end up, through macro and linker magic, mapped to the 
appropriate SDK or ROM functions.
2019-07-22 00:58:21 +03:00
Terry Ellison 1990f95740
Updated ROTables 1st tranch (#2742)
Updated ROTables
2019-05-08 14:08:20 +03:00
dnc40085 07ced63969 Dev wifi/wifi_eventmon malloc/free update (#2318)
* updated wifi_eventmon to store events in LUA_REGISTRYINDEX

* updated wifi_eventmon debug comments

* Updated wifi.c to remove c_free()

In wifi_ap_listclient(app/modules/wifi.c), c_free() was replaced with
wifi_softap_free_station_info()

* Removed unnecessary line of code from app/modules/wifi_eventmon.c
2018-05-20 09:46:04 +02:00
Philip Gladstone ceadd30bca Add support for the wifi monitor mode in the SDK (#2204) 2018-01-10 21:24:41 +01:00
dnc40085 169cb69ee2 Add event callbacks to wifi.sta.config() and wifi.ap.config() and more (#1903)
* Add event callbacks to wifi.sta.config() and wifi.ap.config() and more

Added option to register event callbacks during configuration of both
station and AP.
Added option to register event callbacks to `wifi.sta.connect()` and
`wifi.sta.disconnect()`

* Add note about event registration to wifi module documentation

Other minor changes to wifi documentation are also included

* Add more detail to documentation for wifi.sta.config()
2017-05-21 16:18:56 +02:00
dnc40085 7b1f0223ad Removed wifi station event monitor (#1900)
The following functions were removed:
 - `wifi.sta.eventMonReg()`
 - `wifi.sta.eventMonStart()`
 - `wifi.sta.eventMonStop()`
 
The corresponding documentation has also been removed

This PR addresses issue #1893
2017-05-21 16:17:54 +02:00
dnc40085 41a5736d78 Add wifi.suspend() and node.sleep() (#1231)
* Exposed forced sleep API and more
Added timer suspend functionality
* wifi.suspend
* wifi.resume
* node.sleep 
* tmr.suspend
* tmr.suspend_all
* tmr.resume
* tmr.resume_all
* Implement timer suspend functionality
* Fix for uart TX glitch
* Made some modifications to the error reporting
2017-04-04 21:31:06 +02:00
dnc40085 73773fd8a5 Update to the wifi module (#1497)
* Removed inline documentation for several functions and update comments
Since documentation is now part of the repository, the inline
documentation just adds to the already huge wifi.c

* Wifi module: add new functionality, update documentation

Functions Added:
wifi.getdefaultmode(): returns default wifi opmode
wifi.sta.apchange(): select alternate cached AP
wifi.sta.apinfo(): get cached AP list 
wifi.sta.aplimit(): set cached AP limit
wifi.sta.getapindex(): get index of currently configured AP
wifi.sta.getdefaultconfig(): get default station configuration
wifi.ap.getdefaultconfig(): get default AP configuration

functions modified:
wifi.setmode: saving mode to flash is now optional
wifi.sta.config: now accepts table as an argument and save config to
flash is now optional
wifi.sta.getconfig: added option to return table
wifi.ap.config: save config to flash is now optional
wifi.ap.getconfig: added option to return table

Documentation changes:
- Modified documentation to reflect above changes
- Removed unnecessary inline documentation from `wifi.c` 
- Updated documentation for `wifi.sta.disconnect`to address issue #1480 
- Fixed inaccurate documentation for function `wifi.sleeptype`
- Added more details to `wifi.nullmodesleep()`

* Move function `wifi.sleeptype()` to `wifi.sta.sleeptype()`

* Fixed problem where wifi.x.getconfig() returned invalid strings when
ssid or password were set to maximum length.

* fix error in documentation for `wifi.sta.getapindex`

* Renamed some wifi functions
wifi.sta.apinfo -> getapinfo
wifi.sta.aplimit -> setaplimit 
wifi.sta.apchange -> changeap

also organized the wifi_station_map array
2016-11-06 20:51:01 +01:00
dnc40085 2fdaa9b171 Moved call to set default wifi hostname (#1317)
Moved call from `luaopen_wifi (wifi.c)` to `user_rf_pre_init
(user_main.c)`
Note: This change adds ~440 us to boot time
2016-05-27 13:25:42 +02:00
dnc40085 5e9ab01523 Modified wifi module
Implement SDK event monitor
Move wifi status event monitor code into seperate file
(app/modules/wifi_eventmon.c)
Modify wifi lua callback registration code.
Add Functions wifi.ap.deauth and wifi.sta.getrssi
Rework wifi event monitor to use tasking interface
fix for Lua coroutine compatibility issue
Made changes Suggested by TerryE

Also, moved code that sets the default host name out of
luaopen_wifi_init and into a separate function and added a post_task_low
entry in it's place.

Replaced some if test then return error lines with
luaL_argcheck
Add check for malloc null return in wifi.eventmon 
to catch out of memory errors
2016-03-31 19:01:41 -07:00