Commit Graph

1947 Commits

Author SHA1 Message Date
Philip Gladstone 55ab2fa7e9 Now correctly supports adding User Description desriptors 2024-01-15 11:44:00 -05:00
Philip Gladstone aaaa440d16 First attempt to add name support to characteristics 2024-01-15 09:31:03 -05:00
Philip Gladstone 94833123a8 Merge remote-tracking branch 'origin/dev-esp32' into ble 2024-01-14 21:13:43 +00: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
Philip Gladstone c03e7cffb7
Add the invert option for the ledc module (#3506) 2022-05-20 07:36:36 +02:00
Philip Gladstone 1c26ba35d0 FIx missing } in an example 2022-03-06 15:09:19 -05:00
Philip Gladstone 3e5ba2843c Moved the flash init logic 2022-03-06 14:21:05 +00:00
Philip Gladstone ceb62993da
First attempt at adding support for the RMT device. (#3493)
* Adding the first version of the rmt documentation.

* Stub RMT module compiles.

* This version seems to work in (at least) simple cases.

* CLean up the docs

* Minor fixes

* Give the SPI module a chance of working...

* Update to the released version of idf4.4

* Try to get the CI Build to work in all cases

* Try to get the CI Build to work in all cases

* FIx a ringbuffer return issue

* Remove bogus comment

* Review comments

* Better example of transmission

* Review comments

* Add table send example

* Improved documentation

* Documentation comments

* Install the driver correctly.

* A couple of doc updates

* Fix typo
2022-03-05 17:27:11 -05:00
Philip Gladstone 891cf01b87 Review comments 2022-03-05 22:25:12 +00:00
Philip Gladstone f18e9d5838 Merge remote-tracking branch 'origin/dev-esp32-idf4' into ble 2022-03-05 22:00:05 +00:00
Johny Mattsson cb434811ca
IDF web server module (#3502)
* Added httpd module.

Lua-interface to the standard esp_http_server component.

* Added eromfs module.
2022-03-05 13:51:54 +11:00
Philip Gladstone 225217cfea Updated the Kconfig to note that you have to enable the Nimble module as well. 2022-02-20 21:31:12 +00:00
Philip Gladstone e5892a7286
Give the SPI module a chance of working... (#3496) 2022-01-27 07:02:56 +01:00
Philip Gladstone 8f9295b09e
Update to the released version of idf4.4 (#3498)
* Update to the released version of idf4.4

* Try to get the CI Build to work in all cases
2022-01-25 20:54:17 -05:00
Johny Mattsson 670bf2d6a6
Make UART buffer sizes configurable. (#3500)
Also corrects assumption about number of UARTs available.
2022-01-26 11:32:24 +11:00
Philip Gladstone 4d24232105 Notify seems to work now. 2022-01-07 20:59:38 -05:00