Commit Graph

1933 Commits

Author SHA1 Message Date
Philip Gladstone 92f507562e Seems to work 2024-02-04 11:10:58 -05:00
Philip Gladstone e0c44391f7 Some keys work -- not clear what is going on. 2024-02-03 17:26:57 -05:00
Philip Gladstone 81f0763b80 Partially created module. 2024-02-03 12:26:04 -05:00
Johny Mattsson 6798f027f3 Upgrade to IDF v5.1.2 2024-02-02 14:50:57 +11:00
Philip Gladstone 4816c168d8
Add support for using multiple memory slots in rmt setup (#3568)
* Add support for using multiple memory slots in rmt setup

* Fix a crash when stopping an RMT receiver

* Add missing docs to the mkdocs
2024-02-01 20:31:56 -05:00
Mike_Went 3cc1d48b83 Fix example pins in docs/modules/uart.md 2024-01-30 12:36:10 +11:00
serg3295 796fd7ad0e Fix time.get() for 5.3-int32-singlefp firmware on IDF v5.0.2 2024-01-30 11:34:03 +11:00
serg3295 096164a75c fix(mqtt): adds parameter checking to nil 2024-01-30 11:34:03 +11:00
serg3295 9a9548b0b8 fix(mqtt): select next parameter in connect() 2024-01-30 11:34:03 +11:00
serg3295 9633b03af3 fix: mqtt module 2024-01-30 11:34:03 +11:00
Johny Mattsson 12035a7678 Upgrade to IDF v5.0.2
With minor update required to our spi module.
2024-01-30 11:34:03 +11:00
Johny Mattsson 1400d7bc6e Remove old cryptography package lock.
This workaround is no longer needed nor desired.
2024-01-30 11:34:03 +11:00
Johny Mattsson f126b6fe91 Initial migration to IDFv5.0
Plenty of dependency adjustments, printf format specificier updates,
FreeRTOS type and macro name modernisation, not to mention API changes.

Still plenty of legacy/deprecated drivers in use which will need updating.

The following features have been removed due to no longer being available
from the IDF:
  - ADC hall effect sensor reading
  - Configuration of SD SPI host via sdmmc module (now must be done first
    via the spimaster module)
  - FAT partition selection on external SD cards; only the first FAT
    partition is supported by the IDF now

On the other hand, the eth module now supports the following new chipsets:
  - KSZ8001
  - KSZ8021
  - KSZ8031
  - KSZ8051
  - KSZ8061
  - KSZ8091
  - Possibly additional models in the LAN87xx series (the IDF docs aren't
    clear on precisely which models are handled)

Further, the sdmmc module is now available on the ESP32-S3 as well.
2024-01-30 11:34:03 +11:00
Marcel Stör 2b8e327131 Fix the RTD configuration 2024-01-23 23:01:12 +01:00
Philip Gladstone bf84d4aafc
Updated to IDF 4.4.6 (#3621)
* Updated to IDF 4.4.6

* Use the version that doesn't have my monitor fix in it
2024-01-23 09:17:15 -05:00
Felix Penzlin f125b2d059 configure ledc to auto select clock 2023-05-18 12:46:49 +10:00
Tom Sutcliffe 4523bbb36d Fix i2c.setup() for pins >= 32
Which includes SDA and SCL on esp32s2.
2023-05-13 20:03:06 +10:00
Tom Sutcliffe 7155d7197a Fix platform_rmt_allocate for esp32-S3
By not relying on ifdefing for specific targets, but instead using the
SOC_RMT_xxx macros to figure it out.
2023-05-13 19:32:39 +10:00
Tom Sutcliffe 1b38d8e6eb Fix ws2812 on later esp32 variants
By not relying on the internal details of the RMT registers. For example
on the esp32s2, the threshold event bits start at bit 12 not bit 24, and
on the esp32s3 the memory buffers are only 48 words not 64. Also the
esp-idf recommends against hooking the rmt ISR in the first place.

Instead, use the published rmt APIs (specifically rmt_write_sample and
rmt_translator_init) and the default rmt ISR, which should be much more
resilient against future esp32 SoC changes.
2023-05-13 19:32:39 +10:00
Johny Mattsson 32d03a21da Prefer Lua booleans over 1/nil or 1/0
Document preference and also provide easy-to-use backwards compatible
interface.
2023-02-09 15:52:38 +11:00
Johny Mattsson bc3aaf6e4b Update wifi.sta to support new IDF functionality.
In addition to exposing additional configuration settings, it now also
provides access to the wifi station power-saving control.

Documentation updated, and wifi.sta.getconfig() has been documented. Not
sure why that wasn't already the case.
2023-02-09 15:52:38 +11:00
Johny Mattsson 4379dd9d31 Update to IDF v4.4.3.
Rewrote the embed_lfs.sh section addr/size handling since it was still having
issues between compiler versions.
2023-02-09 15:52:38 +11:00
serg3295 1d173c818b
Fix typo in `file.md` (#3566) 2023-01-17 16:44:59 +01:00
Johny Mattsson 55dbcc79d5 Added mkdir/rmdir support to file module. 2023-01-17 14:34:26 +11:00
Johny Mattsson ccb3b5002d Improvements to external component/module support.
Based on feedback from @tomsci - thanks!
2023-01-17 14:08:47 +11:00
Johny Mattsson 4c510a5a69 Initial support for using external components/modules. 2023-01-17 14:08:47 +11:00
Johny Mattsson c684180dea Remove defunct extmod bits. 2023-01-17 14:08:47 +11:00
Tom Sutcliffe a40d69dbe8 Make sodium.random API behave consistently on all build types
By returning result as a signed 32-bit int between INT32_MIN to IN32_MAX
which is represented the same regardless of 64-bit support or
integral-only builds.

Also updated docs, fixed links and clarified behavior of random APIs
when WiFi isn't started.
2022-12-19 18:53:04 +11:00
Tom Sutcliffe ed85e21a9b Allow LUA_INIT_STRING to be set in menuconfig 2022-11-17 17:26:51 +11:00
serg3295 f592cf4ee5
Fix ledc.md (#3557)
fixes ledc.channel:fade() syntax.
2022-11-10 20:49:16 -05:00
Tom Sutcliffe e3883cd27b Fix file.list() zero sizes. Fixes #3549.
The modern spiffs backend doesn't like stat("./somefile") for something
on the root of the filesystem, and instead only accepts "somefile"
(it also doesn't like "/somefile"). The error from stat was being
ignored which is why the file sizes all appeared to be zero.

The fix is to change file.list() to pass just the filename, unless a
directory was passed to list(). Also improved error handling a bit.
2022-11-08 16:10:47 +11:00
Johny Mattsson cad125c477 Update to use node16 actions per github advice. 2022-10-12 16:14:40 +11:00
Johny Mattsson 38ccd7b2ba Upgrade IDF to v4.4.2
Slightly reworked embed_lfs.sh to better cope with attribute size changes
in future compiler versions, without needing to be updated again.

RMT register naming changed once again...
2022-10-12 16:14:40 +11:00
Philip Gladstone d8f07ddf90 Remove another not-compiling module 2022-10-05 14:53:25 +11:00
Philip Gladstone fef57344db Remove the touch driver as well 2022-10-05 14:53:25 +11:00
Philip Gladstone b9d6e2722e The i2s module doesn't appear to build 2022-10-05 14:53:25 +11:00
Philip Gladstone f15470e44f Include the rmt device for the esp32-c3 (and other missing devices) 2022-10-05 14:53:25 +11:00
Philip Gladstone c7cab0aba4
Adds support for settxpower (#3535)
* Adds support for settxpower

* Update docs/modules/wifi.md

Co-authored-by: Marcel Stör <marcelstoer@users.noreply.github.com>

* Update docs/modules/wifi.md

Co-authored-by: Marcel Stör <marcelstoer@users.noreply.github.com>

Co-authored-by: Marcel Stör <marcelstoer@users.noreply.github.com>
2022-09-29 21:38:32 -04:00
Philip Gladstone 9965635694
Ported the rtcmem over to ESP32 (#3544)
* Ported the rtcmem over to ESP32

* Apply review comments.

* Add the rtcmem string to the config option
2022-09-29 21:37:34 -04:00
Joo Aun Saw d24f2ae459 platform uart: really feed uart data to both console and on-data cb 2022-08-30 18:14:57 +10:00
Joo Aun Saw 0e71189c11 uart: further clean up 2022-08-30 10:38:29 +10:00
Joo Aun Saw 5e6cb4d1fa uart: slight clean up of uart.setup 2022-08-30 10:38:29 +10:00
Joo Aun Saw ddc770a6f7 uart: do not use uninitialized uart pins config 2022-08-29 20:54:31 +10:00
Joo Aun Saw ca0a2b3f47 platform: platform_uart_setup handles null ptr 2022-08-29 20:53:17 +10:00
Joo Aun Saw 01b94f31dc uart: feed rx data to both lua console and on-data callback 2022-08-29 20:52:03 +10:00
Joo Aun Saw a3712ac990 embed_lfs.sh: handle riscv.attributes in esp32c3 map file 2022-06-16 18:34:50 +10:00
h2zero b8ae6ca6f8 Explicitly set RMT config::flags.
If this variable is not set in the config it may contain random data and set the clock source to the REF_CLK
resulting in timing errors, the DHTx, DS18B20 and ws2812 devices to not communicate.
2022-06-04 16:00:19 +10:00
h2zero 484a7721b5 Ensure flash address is set before obtaining memory mapped address.
Before this change the struck member add_phys would contain random data and the call to spi_flash_phys2cache
could return an incorrect memory address.
2022-06-04 15:57:18 +10:00
h2zero c75ec760aa Fix node.compile fwrite size check.
The return value from fwrite was being checked against the size of the data rather than the number of bytes written.
This caused node.compile() to falsely return failure.
2022-06-04 15:55:00 +10:00
Marcel Stör e8caaebc5a Pin jinja2, see https://twitter.com/readthedocs/status/1507388916013314048 2022-05-20 07:51:42 +02:00