Commit Graph

126 Commits

Author SHA1 Message Date
Terry Ellison 6d81dd6c0a Rebased against current dev 2020-06-09 22:26:06 +02:00
Terry Ellison e7c29fe38e Lua 5.1 to 5.3 realignement phase 1 2020-06-09 22:26:06 +02:00
Terry Ellison 98c2c0520d
Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
Johny Mattsson f7a545b951
Evict c_types.h, tidy up a other c_prefixes. (#2841) 2019-07-23 14:22:38 +10: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
Nikolay Fiykov 5f43a414e7 Add pwm2 module (#2747) 2019-05-25 22:08:13 +02:00
Terry Ellison d6980ad802
SDK 3.0 tranche3 (#2761)
Force libpp.a into iRAM, and backout redundant IRAM_DATA_ATTR changes
2019-05-19 14:38:23 +01:00
Terry Ellison bc61528db7
1st Tranch of SDK 3.0 follow up changes (#2732)
1st Tranche of SDK 3.0 follow up changes
2019-05-01 18:29:11 +01:00
Arnim Läuger 530c353ff8
Update u8g2 to v2.25.10 (#2735)
* Upgrade u8g2 and add updateDisplayArea bindings

* u8g2 2.25.10

* add displays for 2.24.3 and 2.25.10

* remove workaround for hal pointer and make use of u8x8's user_ptr

* fix doc

* add binding for `updateDisplay()`
2019-04-28 15:45:04 +02:00
Terry Ellison 9a47107920
SDK 3.0 release (#2692)
* Rebaseline firmware to non-OS SDK version 3.0
* Note that SDK version 3.0 introduces the concept of a Flash Partition Table(PT).  This is located at Flash offset 0x10000 in our firmware build.
* The firmware is now PT aware with both LFS and SPIFFS taking their partition size and location from the PT
* A new tool `tools/nodemcu-partition.py` is now used to initialise these data and can also download LFS and SPIFFS images to these partitions.
2019-04-05 16:01:45 +01:00
Natalia ab61e9c03a I2C sw driver with support of multiple buses, Slow, Fast, FastPlus, and user-defined speed selection (#2465)
* I2C driver speed-up, i2c.SLOW, i2c.FAST and user-defined speed selection

* - Multiple buses (up to 10) with different speeds on each bus
- Standard(Slow, 100kHz), Fast(400kHz) and FastPlus(1MHz) modes or an 
arbitrary clock speed
- Sharing SDA line over multiple I²C buses to save available pins
- GPIO16 pin can be used as SCL pin, but it does not support clock 
stretching and selected bus will be limited to FAST speed.

* Dynamic memory allocation, error checks, simplification, timing tweaks.

* Separated the code of old driver for better compatibility and simplicity

* Change of driver interface

* Add bus status check in setup(); simplify getDC(); remove unnesessary lines in ACK read/write

* Fix for moved doc file and trailing whitespaces
2019-04-05 06:56:11 +02:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Philip Gladstone d75830407e Initial version of code to support multiple hardware timers (#2497)
* Initial version of code to support multiple hardware timers
* MAde the time sinca last tick work again
* Add some documentation to the code
2019-02-16 13:57:59 +01:00
galjonsfigur 5d2bb87ceb Updated FatFS from 0.12a to 0.13c (#2608)
Files changed only by the author of FatFS (only updated to new version):

- 00history.txt
- 00readme.txt
- ff.c
- ff.h
- ffunicode.c
- diskio.h
- integer.h
- files in `option` folder except `syscall.c`

Changes:
- removed option folder (now everything is in ffunicode.c)
- modified Makefile to support new version of FatFS
- removed syscall.c and modified ffsystem.c from FatFS author instead
- modified files: diskio.c, ffconf.h to mimic changes from new version
- modified files: fatfs_config.h, myfatfs.c
because of changes of configuration keywords in 0.13 version
- removed empty lines from beginning of files:
fatfs_prefix_lib.h, myfatfs.c, sdcard.c
- changed version number in documentation
2019-01-16 22:30:42 +01:00
Arnim Läuger 46671928c0 establish delay as event to trigger flushing of spi buffer (#2517) 2018-11-13 13:18:03 +01:00
Natalia 0bdcb81526 u8g2 i2c multibus support (#2526)
* u8g2 support for more than only one i2c bus

* Removed unnecessary #include
2018-10-20 10:29:29 +02:00
Arnim Läuger 67567af959 Submodulify ucg and update to v1.5.2 (#2503)
* turn ucg into submodule
* update ucg to 1.5.2
* add license note to doc
* align docs with esp32
* move ucg hal into platform folder
adapt examples
2018-10-19 21:18:50 +01:00
Arnim Läuger 509be837a8 Update u8g2 to v2.23.18 (#2500)
* Update u8g2 to v2.23.18
* serve wdt for long delays
2018-10-07 21:46:56 +01:00
devsaurus 62f48fe170 unbreak firmware build without u8g2 submodule 2018-07-29 12:43:42 +02:00
devsaurus 87bb96dfbe port u8g2 module from esp32 platform 2018-07-22 13:51:10 +02:00
TerryE 4f21224d56 LFS patch updates following review II and testing 2018-06-22 22:29:16 +01:00
TerryE 4ae52c232c Alpha working wersion for third party evaluation 2018-03-17 00:43:52 +00:00
TerryE 3d3eebfd67 Turn of x bit on some non-executable source files 2018-03-17 00:43:51 +00:00
Philip Gladstone 76ae04f8a7 Fix problem with gpio.input (#2281) 2018-02-28 20:23:35 +01:00
Philip Gladstone 97e34ce520 Fix a number of issues with the gpio.pulse family of functions (#2260)
* Fix some subtle timing issues with gpio.pulse
* Add the pulse:update method
* Allow getstate to work on stopped pulsers
* Make gpio.mode(, gpio.OUTPUT) actually set the output mode
* Added some more documentation
2018-02-23 23:12:23 +01:00
Arnim Läuger 1a39a9f14a disable (and clear) unexpected interrupts (#2234) 2018-02-13 09:17:22 +01:00
devsaurus a0ea61f595 remove inline declarations 2018-01-20 19:42:55 +01:00
Philip Gladstone 9aebc84b72 Add support of counting of interrupts (#2149)
* Add support of counting of interrupts

* Update the timestamp when interrupt happens during dispatch. Also
clear out interrupts when setting up a new callback
2017-12-17 21:42:54 +01:00
Arnim Läuger 4e4dfc1d88 Align 8 MB & 16 MB flash sizes with SDK 2.1.0. (#1968)
* align 8MB and 16MB auto flash support with sdk 2.1.0
* remove SAFE_API
* fix flash size mismatch detection logic
2017-05-16 16:50:36 +02:00
dnc40085 9dbae1c963 Expose UART 1 (#1934)
* Expose UART 1 and update uart module documentation
2017-04-24 22:06:54 +02:00
Arnim Läuger fc887e9f9f Fix memory leak in file_stat(). (#1871)
* Change vfs_stat() api to pre-allocated buffer for stat info.
* Change vfs_readdir() api to stat buffer as well. vfs_item api removed.
2017-03-29 13:58:40 +02:00
Marcel Stör a26969b388 Add generic function to print deprecation notes (#1538) 2017-03-01 12:42:20 +01:00
Arnim Läuger 416d53eb39 Add string support for spi.set_mosi() and spi.get_miso() (#1753)
clean-up endianess handling in spi driver
2017-02-06 13:55:26 +01:00
Marcel Stör 0a503587ee Fix typo (#1714) 2017-01-10 21:09:54 +01:00
Verne Roberts cad1632e40 Add 31250 baud rate for MIDI support (#1690)
* add 31250 baud rate for MIDI support
* add bitrate to uart_bitrates array for the get operation
2017-01-04 12:31:47 +01:00
Arnim Läuger c57af8972f Rework support for >4MB modules: place SPIFFS after SDK data (#1646) 2016-12-26 14:17:57 +01:00
Philip Gladstone feab8b2208 Various minor bits of cleanup (#1647)
* Check the return code of the read function when doing crypto.fhash so that we don't pass negative lengths to the hashing functions
*  Fix various assert failures in the LVM arising from rotables. No functional change
* Add the gpio interrupt time to the callback (and pass it from the interrupt handler)
* Get the PC right in the perf module
* Make the headers static in the websocket module
* Fix the documentation
2016-12-25 10:45:34 +11:00
Philip Gladstone 017b4637c2 Adds uart.getconfig(0) to get the current uart parameters (#1658) 2016-12-11 20:35:04 +01:00
Arnim Läuger b8e00120b6 fix dereferencing NULL pointer in vfs_errno() (#1539) 2016-10-13 16:48:37 +09:00
Arnim Läuger a86fb74c34 implement file.size for spiffs (#1516)
Another bug squashed!
2016-10-02 21:32:48 -04:00
Arnim Läuger b02450f5e0 fix debug compile (#1487) 2016-09-06 12:28:46 +10:00
Arnim Läuger ecf8bd98d6 Add FatFs and SD card support (#1397)
* Add FatFs
* enable BUILD_FATFS for all-module build
* push vfs into rest of firmware
* align maximum filename length
* increase timeout for acmd41 during card initialization
* switch from DOS to Unix path semantics chdrive() is substituted by chdir()
* update to fatfs R.012a incl. patches 1-6
* add callback for rtc provisioning in file
* update docs
2016-09-05 20:17:13 +02:00
Arnim Läuger 84c005e85c Update to SDK 1.5.4.1 (#1390) 2016-07-22 23:18:47 +02:00
moononournation 4aad34158b add 64m and 128m flash support (#1367)
* update esptool.py to v1.2-dev

* add 64 Mbit and 128 Mbit support
2016-06-26 14:16:39 +02:00
Arnim Läuger d416648990 Add pcm module. (#1255)
* Add pcm module.
* Add network streaming example.
* document hw_timer dependency with pwm
* Add vu peak callback.
2016-06-05 23:21:36 +02:00
Philip Gladstone af39a0bc25 Upgrade to latest SPIFFS and add building of file systems (#1226)
Fixes #1164 and thus also #1150, #1149, #1147 and #898.

* Move to latest version of SPIFFS
* Add SPIFFS porting layer for NodeMCU
* Add option to delete output if it doesn't fit
* Change FLASHSIZE to be in bits by default: default 4mb 32mb
* Add SPIFFS_MAX_FILESYSTEM_SIZE override
* Add notes on SPIFFS_FIXED_LOCATION
* Add 1M boundary
* Include the current version of the LICENSE
2016-06-05 23:10:58 +02:00
Johny Mattsson 30d354c290 Rework ADC mode setting approach (#1285)
- Stop fighting against the SDK in terms of owning/writing the init_data block.
  NodeMCU included a default init_data block because originally the SDK did
  not, but by now it's not needed.

- Expose a way to reconfigure the ADC mode from Lua land. With most people
  using the cloud builder and not able to change the #define for byte 107
  this has been a pain point.

- Less confusion about which init_data has been used. Lua code can now simply
  state what mode it wants the ADC to be in, and not worry about the rest of
  the init_data complexities such as the init_data changing location due to
  flashing with wrong flash_size setting, or doing/not doing a chip-erase
  before loading new NodeMCU firmware.
2016-05-18 21:45:15 +02:00
devsaurus 23137b4ed1 Add support for GPIO open-drain output mode. 2016-03-17 00:21:28 +01:00
philip 6efbf13eae Omit all the PWM code if the PWM module is not included 2016-03-01 21:55:21 -05:00
Terry Ellison 00cc4b42dc Merge pull request #1067 from pjsg/rotarymod
Module to handle rotary decoders
2016-03-01 16:36:24 +00:00