Commit Graph

81 Commits

Author SHA1 Message Date
zelll 329bd73b63 ESP32: uart 1/2 supports (#1982)
* uart 1/2

* call -> pcall in uart_on_* functions

* fix docs

* fixed console driver when using custom console uart

* fixed line_inverse and error callback

* fixed a crash when uart.start() called more than one time
2017-06-13 18:33:32 +02:00
devsaurus 1117137363 fix compile warnings 2017-05-05 22:51:21 +02:00
devsaurus fb62011ddf Add sdmmc module and enable fatfs. 2017-04-30 22:49:54 +02:00
devsaurus 31cb312c72 fix insertion of rmt end marker 2017-04-27 23:13:24 +02:00
zelll b7fa8c592f ADC extension for ESP32 (#1927)
* added adc extension

* add adc_number, for adc2
2017-04-24 21:36:01 +02:00
devsaurus 018a67a710 establish flushing of uart to leverage buffering putchar() 2017-04-18 22:43:03 +02:00
devsaurus 066e8d60fa install rmt isr as shared for dht and onewire 2017-04-14 19:56:36 +02:00
devsaurus 1866e6f457 Add ws2812 module. 2017-04-14 19:56:27 +02:00
devsaurus 927ee7fc5f Add dht module. 2017-04-14 19:18:38 +02:00
devsaurus c8e99d50a5 Updated to latest IDF. 2017-04-14 00:22:33 +02:00
devsaurus 3694ffa957 ow: update rmt handover when switching pins 2017-04-01 14:12:58 +02:00
devsaurus e2fdd4adbe Manage RMT channel resources with alloc()/release(). 2017-04-01 10:09:10 +02:00
devsaurus 1116bb2c71 ow: handle misconfigured bus gracefully with timeout 2017-03-20 22:20:45 +01:00
devsaurus 961c1c72b2 Add ow module. 2017-03-17 07:50:31 +01:00
devsaurus f5632f41f9 extend i2c master with hardware interfaces for synchronous and asynchronous operation 2017-02-04 20:14:13 +01:00
devsaurus 381726f103 add i2c module 2017-02-02 21:40:36 +01:00
devsaurus 4fcb1404b6 add simga_delta module 2017-01-13 22:34:24 +01:00
Johny Mattsson 7abda5c9e0 Updated to latest IDF.
- Switched hardcoded interrupts to new IDF interrupt allocation
framework.

- gpio module switched to the IDF's per-pin interrupt callback service.

- Improved NodeMCU linker script since it broke with the IDF upgrade.

- Various compatibility updates.
2016-12-30 19:25:48 +11:00
Johny Mattsson 2b454abfdf Improved flash size detection.
With the recent flash layout changes, it became very possible to misdetect the
flash size. We're now using the partition table as the guard marker, since
that really shouldn't be all 0xff. Also, we now don't clobber the flash
device id (and keep block/sector/page/mask values).
2016-11-17 11:56:39 +11:00
Johny Mattsson 2266670b46 Updated to latest IDF. 2016-11-16 17:59:06 +11:00
Johny Mattsson 5c1bb4c6d6 Updated to latest IDF.
WiFi STA module updated to reflect IDF name changes.

Platform flash and partition api updated to reflect IDF name changes.
Eventually these (and the SPIFFS module) will likely need to be updated
to exclusively work with the esp_partition_xxx() functions in order to
support working with encrypted flash.
2016-11-12 13:17:17 +11:00
Johny Mattsson baf8249a79 Improved flash-size auto-detection.
No longer limited to the default 2MB.
2016-09-23 17:39:06 +10:00
Johny Mattsson 3b65262922 Less memory leaks if not coding in a rush... 2016-09-22 19:50:46 +10:00
Johny Mattsson d369953328 Auto-create SPIFFS partition if not found.
The heuristics could probably be improved a lot, but this is better than
nothing at least.
2016-09-22 18:19:39 +10:00
Johny Mattsson 60339b812b SPIFFS partition support, file module from dev.
Now uses the designated partition (type 0xC2, 0x00) unconditionally.
2016-09-22 17:18:22 +10:00
Johny Mattsson 0fe0096c04 Platform flash layer updated for ESP32.
It would appear my ESP3212 only has a 2MB flash chip despite the
bootloader saying 4MB.
2016-09-22 14:56:40 +10:00
Johny Mattsson 6cd3111d79 Platform interface to flash partition info. 2016-09-22 13:09:56 +10:00
Johny Mattsson 6f54c38e53 Grabbed fatfs from dev branch, and IDF-ified it. 2016-09-21 18:21:44 +10:00
Johny Mattsson 4f1b33d522 Grabbed latest spiffs + vfs layer from dev branch.
Also included the recent LVM fix.

Platform flash layer not yet functional.
2016-09-21 18:14:15 +10:00
Johny Mattsson 9bbf8f43fb Successfully boot barebones NodeMCU on ESP32 (only).
RTOS driver evicted as it did not play nice with stdio etc.

Implemented a minimal driver to fully support Lua console on UART0. Output
on UART0 done via stdout (provided by the IDF). Input and setup handled
via driver_console/console.c. In addition to the direct input function
console_getc(), the driver also registers in the syscall tables to enable
regular stdio input functions to work (yay!). The Lua VM is still using the
direct interface since it's less overhead, but does also work when going
through stdin/fd 0.

Auto-bauding on the console is not yet functional; revisit when the UART docs
are available.

Module registration/linking/enabling moved over to be Kconfig based. See
updates to base_nodemcu/include/module.h and base_nodemcu/Kconfig for
details.

The sdk-overrides directory/approach is no longer used. The IDF is simply
too different to the old RTOS SDK - we need to adapt our code directly instead.

Everything in app/ is now unused, and will need to be gradually migrated
into components/ though it is probably better to migrate straight from the
latest dev branch.
2016-09-20 13:35:56 +10:00
Johny Mattsson a463d764eb WIP ESP32 IDF port.
Currently the UART driver break boot (or at least output).
2016-09-16 18:11:42 +10:00