Commit Graph

72 Commits

Author SHA1 Message Date
Clyde Stubbs c007593f72 Fix for #4866 - inconsistent arguments (#6639) 2024-04-29 15:53:08 +12:00
Evgeny a7079f8fba Added base64 helper (#4866)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-04-24 15:07:07 +12:00
M-A d3a028f7fa Make USE_HOST compilable on msys2 (#6359) 2024-03-13 07:22:28 +11:00
Clyde Stubbs f3ef05f5c3 host platform: improvements and bugfixes (#6137)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-07 14:24:06 +13:00
J. Nick Koston 5c31bec8c2 Ensure names containing characters other than a-z A-Z 0-9 or _ are unique (#5810) 2023-11-23 17:29:08 -06:00
Kuba Szczodrzyński a9630ac847 Support for LibreTiny platform (RTL8710, BK7231 & other modules) (#3509)
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
Co-authored-by: Sam Neirinck <git@samneirinck.com>
Co-authored-by: David Buezas <dbuezas@users.noreply.github.com>
Co-authored-by: Stroe Andrei Catalin <catalin2402@gmail.com>
Co-authored-by: Sam Neirinck <github@samneirinck.be>
Co-authored-by: Péter Sárközi <xmisterhu@gmail.com>
Co-authored-by: Hajo Noerenberg <hn@users.noreply.github.com>
2023-09-05 10:16:08 +12:00
Stijn Tintel f4ac176d77 core: read ESP32 MAC address from eFuse if IEEE802.15.4 is supported (#5176) 2023-08-07 22:45:50 +00:00
Mat931 98bf427600 Add standardized CRC helper functions (#4798)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-30 21:45:56 +00:00
Jesse Hills c835b67bac Add host target platform (#4783)
Co-authored-by: Otto winter <otto@otto-winter.com>
2023-05-10 11:38:18 +12:00
Keith Burzinski c0ad5d1d16 Initial attempt at supporting ESP-IDF 5.0.0 (#4364)
* requirements: add pyparsing >= 3.0

ESP-IDF >= 5.0 requires pyparsing's rest_of_file, which was introduced
in version 3.0.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* esp32: fix build with ESP-IDF >= 5

We need to include esp_timer.h to be able to use esp_timer_get_time().
This header existed in ESP-IDF < 5 so we don't need if guards.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* ota: fix build with ESP-IDF >= 5

As of version 5, esp_task_wdt_init() takes a struct as argument. We also
need to include spi_flash_mmap.h.

[split unrelated change into separate commits, maintain ESP-IDF < 5
compat, use esp_task_wdt_reconfigure, add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* core: fix build with ESP-IDF >= 5

These header files already existed in ESP-IDF < 5 so skip if guards.

[add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* wifi: fix build with ESP-IDF >= 5

ESP-IDF 4.1 introduced the esp-netif API as successor to the tcp_adapter
API. The tcp_adapter API was removed in ESP-IDF 5.0.0. Part of the wifi
component was already migrated to the new API. Migrate the leftover uses
of the old API to the new API to fix build on ESP-IDF >= 5.

The version of ESP-IDF currently in use (4.4.4) supports the new API, so
we don't need any if guards to maintain backwards compatibility.

Also replace xQueueHandle, which is a pre FreeRTOS v8.0.0 data type,
with QueueHandle_t, so we don't need to enable backward compatibility
(CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY).

This reverts part of commit d42f35de5d to wifi_component_esp_idf.cpp,
as the esp-netif API handles that internally.

[replace pre FreeRTOS v8.0.0 data type, add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* mdns: fix build with ESP-IDF >= 5

In ESP-IDF 5.0.0, the mdns component was removed and moved to another
repository. Since the mdns component in esphome is always built, we
need to add the mdns component from the esp-protocols repository. This
component depends on ESP-IDF >= 5.0, so we need to add a version guard.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* docker: install python3-venv

As of version 6.0.1, platform-espressif32 requires python3-venv.
Switching between esp-idf 4.4.4 and 5.0 causes problems with esp-idf
python dependencies installed by PlatformIO. They've solved this by
using venv. Install python3-venv so that platform-espressif32 6.0.1 and
later can be used, and we don't need to wipe the dependencies manually
when switching esp-idf versions.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

---------

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-04-20 03:54:06 +00:00
Jesse Hills d70e7da0ef rp2040: Use fake Mutex lock (#4602) 2023-03-21 20:25:19 +00:00
Oxan van Leeuwen 86c0e6114f Lock scheduler items while modifying them (#4410)
* Cosmetic fixes to scheduler code

* Add generic Mutex API

* Lock scheduler items while modifying them

* Always defer MQTT callbacks on Arduino
2023-02-26 18:43:08 +00:00
Jesse Hills 91925b1826 Update ESP-IDF and platform version (#3565)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2022-11-23 09:54:55 +13:00
Jesse Hills e61a01f7bb Fix imports for rp2040 with no wifi (#3956) 2022-10-28 08:12:12 +13:00
Jesse Hills f97252b93a Implement InterruptLock for RP2040 (#3945) 2022-10-26 16:41:51 +13:00
Jesse Hills 60717b074e Implement different random for rp2040 (#3939) 2022-10-25 17:59:10 +13:00
Jesse Hills 6153bcc6ad Initial Support for RP2040 platform (#3284)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-20 16:50:39 +13:00
Jesse Hills c317422ed7 Move crc16 to helpers (#3780) 2022-09-06 12:57:21 +12:00
anatoly-savchenkov 01a4443b6c Webui small fixes (#3713) 2022-08-15 10:28:29 +12:00
Jesse Hills 4525588116 Add helper overloads for hex print 16-bit (#3297) 2022-03-16 13:35:37 +13:00
Otto Winter 3a67884451 Improve dallas timing (#3181)
* Improve dallas timing

* Format
2022-02-11 09:06:06 +01:00
Otto Winter 62b366a5ec Fix ESP32C3 toolchain requires stdarg import in helpers (#3151) 2022-02-01 13:05:59 +01:00
Jesse Hills 4a5970b4af Fix backwards string case helpers (#3126) 2022-01-31 10:58:27 +13:00
Oxan van Leeuwen 976f5d91ed Logically group and document helper functions (#3112) 2022-01-27 20:35:42 +13:00
Oxan van Leeuwen 80d03a631e Force braces around multi-line statements (#3094)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-25 08:56:36 +13:00
Oxan van Leeuwen 737188ae50 Fail hard if no random bytes available for encryption (#3067) 2022-01-18 14:29:57 +13:00
Oxan van Leeuwen 6383eca54a Clean-up random helper functions (#3022) 2022-01-10 13:50:26 +13:00
Sergey Dudanov 9a70bfa471 New Midea IR component, improvements and fixes (#2847)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-10 11:47:19 +13:00
Oxan van Leeuwen 07e790f900 Drop uint{32,64}_to_string() helper functions (#3009) 2022-01-06 16:36:11 +01:00
Oxan van Leeuwen 640142fc0c Introduce str_lower_case() and str_upper_case() helpers (#3008) 2022-01-06 16:35:59 +01:00
Oxan van Leeuwen 5c339d4597 Convert clamp() helper to backport of std::clamp() (#3010) 2022-01-07 00:56:10 +13:00
Oxan van Leeuwen a4931f5d78 Clean-up reverse_bits helpers (#3011) 2022-01-07 00:54:58 +13:00
Oxan van Leeuwen 5143a5b5c5 Use to_string() from STL when available (#2992) 2022-01-03 23:30:03 +01:00
Oxan van Leeuwen beeb0c7c5a Introduce hex parsing & formatting helper functions (#2882) 2021-12-13 09:15:23 +13:00
anatoly-savchenkov cae283dc86 Fixed data type inside fast_random_8() routine (#2818) 2021-11-29 08:31:15 +13:00
Oxan van Leeuwen 10a2a7e0fc Fix parsing numbers in Anova (#2816) 2021-11-29 08:00:29 +13:00
Oxan van Leeuwen 897277992b Introduce str_snprintf helper function (#2780) 2021-11-23 20:30:49 +13:00
Oxan van Leeuwen 5404163be0 Clean-up MAC address helpers (#2713) 2021-11-15 15:48:16 +01:00
Oxan van Leeuwen 66cebfc992 Restore InterruptLock on wifi-less ESP8266 (#2712) 2021-11-15 08:05:11 +13:00
Oxan van Leeuwen 99c775d8cb Introduce encode_value/decode_value() template functions (#2662) 2021-11-10 19:44:01 +01:00
Oxan van Leeuwen 4d43396835 Clean-up string sanitation helpers (#2660) 2021-11-10 19:42:41 +01:00
Oxan van Leeuwen 15f9677d33 Introduce parse_number() helper function (#2659) 2021-11-11 07:15:06 +13:00
Carlos Garcia Saura 875b803483 Remove "delay_microseconds_accurate()" and improve systemwide delayMicroseconds() (#2497) 2021-11-10 16:22:00 +13:00
Guillermo Ruffino d536509a63 Allow esp8266 to compile with no wifi (#2664) 2021-11-05 10:52:38 +13:00
Oxan van Leeuwen c0fc5b48ae Fix pin/component switchup in SX1509 pin configuration (#2593) 2021-10-21 19:55:19 +02:00
Maurice Makaay c89018a431 Option to ignore CRC for EFuse MAC address (#2399)
* Accept changes as proposed by black.

* Added test and implemented optional correctly.

* Disable PHY RF full calibration (because it calls the breaking MAC retrieval function).

* Disable CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE instead of enable, dummy!

* Rename CONF_IGNORE_EFUSE_MAC_CRC to CONF_ESP32_IGNORE_EFUSE_MAC_CRC.

* Removed unused import.

* Fix ordering of constants.

* Moved all MAC address logic to core helpers.

* Use pretty MAC address for the log.

* Use standard MAC formatter function for debug component.

* Fix clang-formatting.

* Fix clang-formatting.

* Brought wording of comments in line with other function-describing comments.

* Processed code review by @OttoWinter

* Add USE_ESP32_IGNORE_EFUSE_MAC_CRC to defines.h

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-09-30 18:08:15 +02:00
irtimaled c39ac9edfe Support HSV-based color support on tuya light (#2400)
* fix: stop tuya light state getting reset

* fix typo

* Support for HSV color in Tuya

* Clamp formatting
2021-09-28 22:19:17 +02:00
Oxan van Leeuwen 5596751c2c Add str_sprintf function that returns std::string (#2408) 2021-09-28 10:24:55 +13:00
irtimaled 7246f42a8e Tuya rgb support (#2278)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-26 21:34:06 +13:00
Otto Winter 8503e08ee6 Fix InterruptLock on ESP-IDF (#2388) 2021-09-25 09:14:07 +02:00