Johny Mattsson
fd9113124c
Corrected the 4-page alignment for start of fs.
2015-12-16 18:59:55 +11:00
Johny Mattsson
4e8ef87d03
Reworked module registration, removed modules.h
...
Module creation & registration now made a lot simpler. In essence,
each module file is now self-contained and only needs a
NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);
line to both be automatically recognised by the Lua initialization
as well as honor the LUA_USE_MODULES_MYNAME #define.
2015-12-16 16:09:16 +11:00
TerryE
b773290b8c
Major cleanup of module registration pass 2.
...
carrying on Johny's edits as per my comments on #810
2015-12-16 11:21:40 +11:00
Artem Pastukhov
5cb27f89ae
Add ImageMagic info.
2015-12-15 09:35:20 +03:00
Artem Pastukhov
6009602382
Some polish
2015-12-14 11:41:10 +03:00
Artem Pastukhov
4b0cec1757
* Add u8glib readme.
2015-12-14 11:34:11 +03:00
Terry Ellison
0386ae6559
Merge pull request #804 from DiUS/panic
...
Do not allow execution to continue after a PANIC
2015-12-12 15:36:00 +00:00
Johny Mattsson
6b6456be47
Major cleanup of module registration.
...
As per #810 & #796 , only LUA_OPTIMIZE_MEMORY=2 & MIN_OPT_LEVEL=2 are
supported when building. This commit effects that limitation.
With this change modules/auxmods.h no longer needs to be updated for
every new module, nor do module writers need to cater for a hypothetical
LUA_OPTIMIZE_MEMORY < 2 scenario.
2015-12-12 15:03:40 +11:00
Johny Mattsson
d84a24fc9a
Proper cached-flash to phys address translation.
2015-12-12 13:20:22 +11:00
Johny Mattsson
c4e8b04fbf
Cleaned up all uses of INTERNAL_FLASH_START_ADDRESS.
...
There was only one genuine use of this macro, all other places were
using it only as a necessary compensation. While this was fine as long as
it was the first meg of flash which was mapped, it became incorrect and
quite dangerous whenever this assumption did not hold (such as when
running from the second slot in an OTA scenario).
The flash API now uses actual addresses, not translated/mapped
addresses, and the users of this API have been adjusted accordingly.
This makes the flash API work correctly regardless of what flash mapping
is in use.
The old macro is still available under the new name
INTERNAL_FLASH_MAPPED_ADDRESS, and this is used to detect flash writes
where the source is mapped flash (and thus has to be bounced), and to
adjust the _flash_used_end linker symbol when used with
flassh_find_sector() by the filesystem code. The latter usage is not
OTA-proof, but in an OTA scenario the filesystem needs a fixed location
anyway and thus would not use this code path.
2015-12-12 13:20:22 +11:00
Nick Andrew
e9ee9a57d1
Remove the lobject.c:88 assertion failures
...
When lua assertions are enabled, normal operation results in many:
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
It comes from using the pvalue() macro for 3 pointer types, where
pvalue() also checks the type of pointer and complains through the
assertion where the type == 4 (TLIGHTUSERDATA).
Use the correct macro according to the type of data being compared
to eliminate this assertion error.
Signed-off-by: Nick Andrew <nick@nick-andrew.net>
2015-12-06 01:42:29 +11:00
TerryE
e71a2dd64a
Fix ECG case in concat where stack top not recalculated
2015-12-03 19:16:30 +00:00
Terry Ellison
32b2911263
Merge pull request #746 from DiUS/vdd33
...
Remove adc.readvdd33() limitation.
2015-12-01 23:37:53 +00:00
Johny Mattsson
e9e2efc443
Merge pull request #794 from btsimonh/btsimonhdev
...
Added uart.alt(n) to swap to use alternate rx/tx lines.
2015-12-01 21:35:09 +11:00
Johny Mattsson
6acd91810f
Merge pull request #776 from askainet/net_dns
...
Make net.dns.resolve and net.dns work with an IP address as the hostname
2015-12-01 21:24:05 +11:00
Johny Mattsson
0fbf442158
Do not allow execution to continue after a PANIC!
...
It really does not improve things...
2015-12-01 18:11:38 +11:00
btsimonh
b2345857e9
Added uart.alt(n) to swap to use alternate rx/tx lines.
...
if n = 0 -> std pinout.
if n != 0 -> alternate pinout (gpio13 and gpio15)
2015-11-28 22:51:01 +00:00
Johny Mattsson
33e41a633e
Merge pull request #787 from TerryE/dev-onewire
...
Merge Onewire changes from Master into Dev
2015-11-24 11:05:40 +11:00
Johny Mattsson
455f0f2166
Merge pull request #779 from askainet/sntp_dns
...
Make sntp.sync work with DNS hostnames
2015-11-24 11:03:37 +11:00
TerryE
583049f620
Merge Onewire changes from Master into Dev
...
Master contained two OW changes one of which was already reimplemented in dev using the
correct macros. The second was from hazarkarabay (f6d0c0c
) that onewire_search()
returns a device address vector even when no device is found. I've reimplemented this
but using the correct index, rom_byte_number, rather than declaring a new temp index i.
2015-11-23 01:23:41 +00:00
devsaurus
1c2fad5330
re-add detection of CR as newline
2015-11-22 13:00:40 +01:00
Arnim Läuger
b216e6a809
Merge pull request #777 from devsaurus/dev-cr
...
Skip CR in interactive mode
2015-11-20 22:56:12 +01:00
Terry Ellison
7460f034ea
Merge pull request #780 from marcelstoer/dev-order-modules-list
...
Order modules list alphabetically
2015-11-19 23:47:21 +00:00
Marcel Stör
6674a7d7f9
Add reference to HX711 documentation to source
2015-11-19 22:54:06 +01:00
Marcel Stör
5b00d02bf2
Order modules list alphabetically
2015-11-19 22:48:05 +01:00
Ivan Lopez
d96383691f
Make sntp.sync work with DNS hostnames
2015-11-19 21:51:33 +01:00
devsaurus
69f3a6f177
skip CR in interactive mode
2015-11-18 22:07:53 +01:00
Ivan Lopez
4ff9e6cc01
Make net.dns.resolve and net.dns work with an IP address host to resolve
2015-11-18 21:22:58 +01:00
Ivan Lopez
a272491502
Make net.dns.resolve and net.dns work with an IP address host to resolve
2015-11-18 20:58:33 +01:00
Johny Mattsson
98d0157283
Merge pull request #755 from robertfoss/dev
...
Added fix from #750 , to access the IP of a sender of a UDP packet, to fix SDK 1.4.0 compability.
2015-11-17 17:51:03 +11:00
Johny Mattsson
5a199e6e63
Merge pull request #751 from lukaszo/ct
...
Allow to set content type in COAP (fix #658 )
2015-11-17 12:17:11 +11:00
Robert Foss
d19c350ead
Added fix from #750 , to access the IP of a sender of a UDP packet, to fix SDK 1.4.0 compability.
2015-11-11 23:46:26 -05:00
Johny Mattsson
1e3c231630
Fix esp_init_data_default inconsistencies.
...
Make ADC vs readvdd33 option user_config.h configurable for the init data,
and made readvdd33 the default.
2015-11-12 12:57:07 +11:00
Johny Mattsson
340edbbe2f
Merge pull request #750 from lukaszo/coap-deb
...
Fix sending CoAP UDP response using new SDK 1.4.0
2015-11-12 10:41:37 +11:00
Łukasz Oleś
3a5e845b29
Allow to set content type in COAP ( fix #658 )
2015-11-11 12:52:13 +01:00
Johny Mattsson
7ef1711e9a
Merge pull request #740 from Alkorin/ws2812
...
Better timings for WS2812 (measured 345ns/695ns, instead of 340ns/600ns)
2015-11-11 21:09:31 +11:00
Vowstar
63fad194e2
Merge pull request #731 from dnc40085/dev_wifi_sleep_update
...
Update function wifi.sleep
2015-11-11 17:10:10 +08:00
Łukasz Oleś
982be36aab
Fix sending UDP response using new SDK 1.4.0
2015-11-11 00:53:02 +01:00
Terry Ellison
ad99c016cd
Merge pull request #729 from DiUS/tcp-port-rand
...
Fix to do TCP port number randomization at boot.
2015-11-10 21:57:01 +00:00
Thomas Soëte
4fd552fcaf
Better timings for 160MHz too.
...
Values measured:
@80MHz:
T0H: 337ns, Period: 1.274us
T1H: 687ns, Period: 1.25us
@160MHz:
T0H: 349ns, Period: 1.262us
T1H: 700ns, Period: 1.276us
2015-11-10 22:34:44 +01:00
Johny Mattsson
dabfe83a7d
Unbreak build from #735 merge.
...
Now with more #ifdef.
2015-11-10 18:48:39 +11:00
Johny Mattsson
27eed629e7
Remove adc.readvdd33() limitation.
2015-11-10 15:30:59 +11:00
Johny Mattsson
7512e628b6
Merge pull request #742 from TerryE/dev-stripdebug
...
Port of strip debug patch to the SDK 1.4-baseline dev
2015-11-10 12:20:36 +11:00
Johny Mattsson
cfae4cdc4e
Merge pull request #735 from karrots/mqtt_close_disconnect
...
mqtt:close() send the DISCONNECT message (fix #673 )
2015-11-10 12:08:16 +11:00
Johny Mattsson
382eea5079
Fix building with DEVKIT_0_9 defined.
...
This got broken in the 1.4.0 overhaul, mea culpa.
2015-11-09 12:15:40 +11:00
TerryE
83d06b667d
Port of strip debug patch to the SDK 1.4-baseline dev
2015-11-08 23:46:08 +00:00
Thomas Soëte
c2f12a3b05
Better timings for WS2812 (measured 345ns/695ns, instead of 340ns/600ns)
2015-11-08 22:45:12 +01:00
Antoine
b2167bdf3a
mqtt:close() send the DISCONNECT message ( fix #673 )
2015-11-06 07:32:04 -07:00
dnc40085
51046fd78b
Minor change to wifi.sleep
...
Remove unnecessary code
2015-11-06 05:10:24 -08:00
Jens Jensen
c39d317b2b
Fix mqtt connection closing when not publishing ( fixes #359 )
...
should not reset keep_alive_tick when receiving as this can prevent
sending keepalive (PINGREQ), which can result in server disconnect.
2015-11-05 20:21:53 -07:00
Johny Mattsson
5d28de8595
Merge pull request #722 from TerryE/luac-cross.2
...
Moving luac cross from master to dev
2015-11-06 09:49:38 +11:00
dnc40085
5e95f48a55
Update function wifi.sleep to return any error codes to user
2015-11-05 13:51:42 -08:00
Johny Mattsson
f82415f6b9
Fix to do TCP port number randomization at boot.
...
This addresses the issue where a server would otherwise reject a valid
connection attempt from a rebooted node, due to the server thinking that
packet belonged to a recently closed session. By starting off the local
TCP port numbers at random* points each boot the risk of port reuse
across a reboot is significantly reduced.
*) As random as can be had via the lower 12 bits of the ccounter.
2015-11-05 14:40:57 +11:00
Vowstar
3da57dc85c
Merge pull request #725 from dnc40085/dev_wifi_toggle
...
Add function wifi.sleep
2015-11-05 10:07:32 +08:00
dnc40085
75849f79ab
Fix compiler warning in tmr.c
...
Fix compiler warning: implicit declaration of function 'system_soft_wdt_feed'
2015-11-04 17:55:09 -08:00
dnc40085
91ba22a49d
Minor change
...
Added static keyword to a variable
2015-11-04 06:37:57 -08:00
dnc40085
d6cc6d3e68
added wifi table entry for NULLMODE
2015-11-03 18:06:41 -08:00
Johny Mattsson
5c1c51642e
Fix newly introduced incorrect WDT feeding.
2015-11-04 12:46:37 +11:00
dnc40085
4387f90339
Added function wifi.sleep
2015-11-03 17:23:43 -08:00
TerryE
0beee5c1ae
Minor tweaks to luac.cross for SDK 1.4 support
...
plus Add extra logic to handle different loci path in luac.cross
for handling 32 bit or great hex integers Also add a helpfull hint in the
build tool to point out the Lua and lfs depencencies.
2015-11-03 22:45:43 +00:00
TerryE
307323d1ff
Add luac.cross capability to nodeMCU
2015-11-03 21:37:14 +00:00
TerryE
a08626d84f
Add minimum debug library providing traceback() and getregistry() functions
2015-11-03 21:34:42 +00:00
kvakanet
e2dd98ba10
Update mqtt.c fix for #679
...
Patch for "mqtt LWT qos and retain parameters are parsed incorrectly #679"
2015-11-02 20:14:43 -07:00
Vowstar
95e2bbb0f0
Merge pull request #688 from karrots/mqtt-puback-fix
...
Fix for MQTT PUBACK loop
2015-11-01 14:34:12 +08:00
Vowstar
a38fbdbf51
Merge pull request #713 from christakahashi/hx711-support
...
Added support for the hx711 load cell ADC.
2015-11-01 14:31:12 +08:00
Vowstar
3e0a3e992e
Merge pull request #717 from karrots/feature/baudrate_define
...
Add #DEFINE to user_config.h to enable easier bit rate selection.
2015-11-01 14:30:57 +08:00
Jonathan karras
66e65bd3c1
Add #DEFINE to user_config.h to enable easier bit rate selection.
2015-10-31 19:47:11 -06:00
chris
dffbfacd46
most users won't need this so it should be off be default
2015-10-30 23:31:45 -07:00
Jonathan karras
57c2e6eacd
Fix for MQTT PUBACK loop
...
Conflicts:
app/modules/mqtt.c
2015-10-29 20:02:08 -06:00
devsaurus
52d6be5299
Merge pull request #705 from devsaurus/dev-fdplx
...
Update full-duplex for SPI module
2015-10-28 23:36:39 +01:00
devsaurus
9444ae28df
simplify spi api
...
duplex_mode configuration enables/disables receiving with spi.send()
spi.send_recv removed
2015-10-27 23:30:33 +01:00
Vowstar
38b494c07e
Merge pull request #702 from devsaurus/dev-fdplx
...
Add full-duplex support to SPI module
2015-10-27 14:34:13 +08:00
Johny Mattsson
b535be7ab8
Fix WDT resets during file.format().
...
With the new SDK soft-wdt it is no longer sufficient to tickle the hardware
watchdog, so all (found) instances have been changed to system_soft_wdt_feed().
2015-10-27 14:33:22 +11:00
devsaurus
0ba0370b87
fix construction of table
2015-10-26 22:40:11 +01:00
devsaurus
d46bc5cc1f
align spi_recv to platform_spi_send_recv
2015-10-26 22:39:33 +01:00
devsaurus
7d77398921
introduce full/half duplex transactions and add spi.send_recv()
2015-10-25 22:58:06 +01:00
devsaurus
c223ecfe5f
Merge pull request #693 from devsaurus/dev-hspi_apiext
...
Extend SPI module API with improved transaction handling
2015-10-21 22:33:08 +02:00
devsaurus
75488639eb
make spi.send() transparent for 32 bit data
...
accept negative values as u32
2015-10-19 23:01:59 +02:00
devsaurus
7ac9a46c40
support secure connection based on CLIENT_SSL_ENABLE
2015-10-18 23:04:40 +02:00
devsaurus
a6eb5ccb80
improved default handling of clock_div and databit length
2015-10-18 11:37:17 +02:00
devsaurus
26f4bc7957
ensure backwards compatibility of exising api functions
2015-10-18 11:13:57 +02:00
devsaurus
19092712e5
remove obsolete spi_mast_send and rename platform_spi_send
2015-10-18 11:13:56 +02:00
devsaurus
28a04cc9c1
remove obsoleted constants for databit length
2015-10-18 11:13:56 +02:00
devsaurus
f238673772
rework of (H)SPI API
2015-10-18 11:13:55 +02:00
devsaurus
9cde0bbb83
add SPI transaction support
2015-10-18 11:13:55 +02:00
aeprox
5ab8de34e7
Fix adc.readvdd33
...
Replace undocumented readvdd33 function with SDK function system_get_vdd33
2015-10-17 15:47:17 +02:00
Vowstar
340ef8fc0a
Merge pull request #636 from karrots/mqtt-clean-session
...
Added mqtt clean session support.
2015-10-17 20:58:06 +08:00
Johny Mattsson
8fba0f47de
Make UDP server work again after 1.4.0 API changes.
2015-10-15 12:14:27 +11:00
Johny Mattsson
afdd9430e0
Removed old lwip include file.
2015-10-12 15:57:24 +11:00
Johny Mattsson
f54264669b
Fixed includes after LWIP 1.4.0 upgrade.
2015-10-12 14:31:52 +11:00
Johny Mattsson
5d5be35633
Upgraded LWIP to 1.4.0 released from Espressif.
...
Plus directly provided patch for user_interface.h.
2015-10-12 14:31:04 +11:00
Johny Mattsson
711d464a2b
Re-enabled open source LWIP.
2015-10-12 13:26:05 +11:00
Johny Mattsson
a161f882ae
Espressif-provided fix for open source LWIP on 1.4.0.
2015-10-12 13:26:05 +11:00
Johny Mattsson
dec159bce1
Support for fixing the filesystem location.
...
To assist with testing new SDK.
2015-10-12 13:26:05 +11:00
Johny Mattsson
bf8ed500bf
Moved node.key() & node.led() support into node module.
...
It was piggybacking on the Lua readline timer which no longer exists.
Also cleaned up injection of Lua commands via CoAP & node.input().
2015-10-12 13:26:05 +11:00
Johny Mattsson
fe6289a6c2
Switch Lua input to event driven instead of polled.
...
The Lua input timer has been the thorn in the side which prevents a lot of
potential sleeping, unnecessarily.
2015-10-12 13:26:05 +11:00
Johny Mattsson
67a711931a
Switch to SDK LWIP until issues with the open one can be resolved.
2015-10-12 13:26:05 +11:00
Johny Mattsson
e905c24dcc
Removed unsused, now incompatible SSL code.
2015-10-12 13:26:05 +11:00
Johny Mattsson
21c4e11020
Enable dynamic build dates, plus print SDK version.
2015-10-12 13:26:05 +11:00
Johny Mattsson
30380f6cff
Further cleanup of ld directory.
...
Renamed the main linker script to make it clear it is customised for NodeMCU
and not to be confused with the standard linker SDK linker scripts.
Changed to using the eagle.rom.addr.v6.ld file from the SDK.
2015-10-12 13:26:04 +11:00