Piotr Szulc
d1386a8e9d
[libs] Fix mDNS string memory corruption, print error on record add failure ( #260 )
...
* Fixed unsafe conversion to underscore string
* Fixed formatting
* Save one byte if underscore not needed
* Don't allocate new string if already underscored
* Fix missing first character while copying
* Renamed function and made it inline
* Don't use signed index variable when searching for service
* Add proper cleanup of LwIPmDNS
- Free allocated memory both on end() and in the destructor
- Unregister callback from netif
* Don't free const pointer
* Removed unneeded casting
* Don't break the loop if failed to add txt record
* Fixed code formatting
2024-03-08 12:21:14 +01:00
cap9qd
cf52021d38
[core] Split reboot reasons due to wakeup ( #254 )
...
* Updates to break out wakeup reasons.
Per https://github.com/libretiny-eu/libretiny/issues/234
* Update cores/common/base/api/lt_device.h
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl >
* fix clang-format
* Fix formatting of python files.
* Update lt_device.h
---------
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl >
2024-02-25 18:45:22 +01:00
Hajo Noerenberg
4cddc01f22
[libs] Fix MD5 calculation during OTA update ( #240 )
2024-01-17 22:49:33 +01:00
Piotr Szulc
1d80b5fff7
[beken-72xx] Free list returned by wlan_sta_scan_result() ( #226 )
...
* Free list returned by wlan_sta_scan_result()
* scanAlloc improvements
There were a few things I didn't like about this function:
1) realloc() was called a bit too often.
2) if realloc() failed, the previous memory was not freed.
3) scanAlloc returned previous count or 255 on error. But there was no real check for error and 255 could've been used as index to null. I think it's better to simple return boolean.
4) scanAlloc was clearing memory only up to (and excluding) the new entries.
* Corrected clearing new entries in scanAlloc
* scanAlloc() now returns number of allocated items
* Fixed compilation issues related to goto.
2024-01-06 19:41:01 +01:00
Mike La Spina
3b79636d00
[libs] Fix SerialClass available() return value ( #173 )
...
Co-authored-by: descipher <120155735+GelidusResearch@users.noreply.github.com >
2023-09-21 17:19:51 +02:00
Kuba Szczodrzyński
57c43ce515
[libs] Fix possible MD5 memory leak in Update
2023-08-30 11:35:11 +02:00
Kuba Szczodrzyński
1ac3d30d84
[libs] Implement Update MD5
2023-08-29 19:19:28 +02:00
Kuba Szczodrzyński
27393e47c3
[beken-72xx] Initialize UART to fix deep sleep
2023-08-23 16:08:03 +02:00
Hajo Noerenberg
ccf21b4eab
[realtek-ambz] Enable Mbed-TLS for MD5 hashing, remove Polar SSL ( #156 )
...
* Enable Mbed-TLS, remove Polar SSL
* Reformat lt_defs.h
---------
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl >
2023-08-17 15:20:02 +02:00
Péter Sárközi
93e0a5d066
[beken-72xx] Implement deep sleep ( #140 )
...
* Initial support code for Deep Sleep
* Global functions
* Remove unnecessary override
* clang-format
* Support for multiple pins
* Fix math
* Add a way to unset GPIOs
* Clang format
* Update brief
---------
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl >
2023-07-13 18:00:14 +02:00
Kuba Szczodrzyński
4d81fcac26
[realtek-ambz2] Flash bootloader & partition table in UF2
2023-07-13 17:00:42 +02:00
Kuba Szczodrzyński
a3bbdf1c16
[core] Migrate to uf2ota v5.0.0, refactor OTA API
2023-07-13 12:15:48 +02:00
Kuba Szczodrzyński
39df2e7b54
[core] Move C types to API units
2023-07-13 12:06:37 +02:00
Kuba Szczodrzyński
e38e53bac0
[core] Split lt_api.c into separate units
2023-06-22 18:30:14 +02:00
Kuba Szczodrzyński
b38a4d5d46
[core] Add hardware peripheral availability defines
2023-06-21 17:02:48 +02:00
Kuba Szczodrzyński
73ede2838c
Merge branch 'master' into family/ambz2
2023-06-20 18:53:46 +02:00
Kuba Szczodrzyński
05e13dafed
[beken-72xx] Rename BK7231U to BK7231T, add BK7231Q family
2023-06-20 17:19:21 +02:00
Kuba Szczodrzyński
6135e4f7b0
[boards] Update flash layouts, add W302 chip
2023-05-29 16:16:58 +02:00
Kuba Szczodrzyński
af8c7417b3
[realtek-ambz2] Keep LOG UART enabled, wipe OTA2 in UF2
2023-05-28 19:18:54 +02:00
Kuba Szczodrzyński
4532c88873
[core] Add lt_set_debug_mode() function, update core types
2023-05-27 16:03:46 +02:00
Kuba Szczodrzyński
87ad0798e4
[realtek-ambz2] Adapt WiFi library to ambz2_sdk
2023-05-27 15:41:07 +02:00
Kuba Szczodrzyński
a80032d46c
[core] Move Wiring common core to wiring/, reset watchdog in yield()
2023-05-26 15:29:33 +02:00
Kuba Szczodrzyński
4dae304f51
[core] Add lt_get_device_mac() function
2023-05-25 20:43:00 +02:00
Kuba Szczodrzyński
c0cc602c9a
[core] Add configure() for SerialClass
2023-05-25 14:29:35 +02:00
Kuba Szczodrzyński
e5f98ff41f
[core] Refactor Wiring, use PinData for parameters
2023-05-24 22:01:05 +02:00
Kuba Szczodrzyński
bc74c21599
[realtek-ambz2] Enable compilation of Arduino core
2023-05-24 13:02:33 +02:00
Kuba Szczodrzyński
3836ad20b7
[core] Refactor SerialClass as API library
2023-05-24 11:55:07 +02:00
Kuba Szczodrzyński
b073290989
[realtek-ambz2] Implement base C API
2023-05-23 19:54:00 +02:00
Kuba Szczodrzyński
07e9aa1ded
[realtek-ambz2] Make compiling base core possible
2023-05-19 10:42:59 +02:00
Kuba Szczodrzyński
752768b1e2
[docs] Update supported chip list, remove AmebaZ2 boards for now
2023-05-18 21:03:08 +02:00
Stroe Andrei Catalin
219415174e
[libs] Fix mDNS after a wifi disconnect / reconnect event ( #112 )
...
* [libs] Fix mDNS not responding when device disconnects / reconnects to wifi
* Minor bugfix
* Reworked mDNS fix
* Update LwIPmDNS.cpp
2023-05-01 21:44:03 +02:00
Kuba Szczodrzyński
8337ac121e
[core] Fix reentrant malloc wrappers
2023-05-01 20:58:37 +02:00
Kuba Szczodrzyński
dbc905dca3
[core] Rename project to LibreTiny
2023-04-27 23:30:46 +02:00
Kuba Szczodrzyński
461e4c6df0
[core] Prepare for project name change
2023-04-24 11:35:39 +02:00
Kuba Szczodrzyński
c5361a4738
[beken-72xx] Use realloc() based on malloc()
2023-04-22 18:29:52 +02:00
Kuba Szczodrzyński
42c18859f3
[core] Update ltchiptool to fix activating OTA
2023-04-22 18:10:47 +02:00
Kuba Szczodrzyński
2a7f1b52a0
[core] Update ltchiptool to v4.0.0
2023-03-26 17:44:40 +02:00
Kuba Szczodrzyński
63ac7b365d
[core] Add ESP inline library
2023-03-20 21:29:57 +01:00
Kuba Szczodrzyński
c51bf0b7db
[core] Migrate to GPIO-based pin numbering
2023-03-20 21:28:50 +01:00
Kuba Szczodrzyński
201db4668e
[realtek-ambz] Fix WiFi AP mode and DNS
2023-03-18 13:27:16 +01:00
Kuba Szczodrzyński
2e30d34021
[core] Update Arduino compatibility, fix MD5 library
2023-03-17 17:33:43 +01:00
Kuba Szczodrzyński
2882eaa0c2
[core] Print platform versions, add GCC version to startup banner
2023-03-17 17:32:28 +01:00
Kuba Szczodrzyński
8faffedddc
[core] Fix swapped flash reading/writing API
2023-03-16 17:48:34 +01:00
Kuba Szczodrzyński
3d3f3700a8
[core] Update lwIP for SDK-independent headers
2023-03-14 13:07:44 +01:00
Kuba Szczodrzyński
4e3b081c60
[core] Include GCC version in the startup banner
2023-03-13 17:27:21 +01:00
Kuba Szczodrzyński
c3f12ab247
[core] Rename CPU and memory APIs
2023-03-12 14:11:16 +01:00
Kuba Szczodrzyński
dfcb36361e
[docs] Refactor & update API documentation
2023-03-11 21:58:43 +01:00
Kuba Szczodrzyński
fd1afea1bc
[core] Refactor LT class into C methods
2023-03-10 19:08:55 +01:00
Kuba Szczodrzyński
6b92aac1da
[core] Organize GCC compilation flags
2023-03-04 17:19:24 +01:00
Kuba Szczodrzyński
3113b387c3
[boards] Move docs generation to GitHub Actions
2023-03-04 16:56:49 +01:00