62 Commits

Author SHA1 Message Date
Ulf Lilleengen
62529e2fd3
chore: update bt-hci version (#4146)
* chore: update bt-hci version

* chore: use released version of trouble-host

* Make sure clippy fails, fix warning

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-19 13:48:49 +00:00
Simon Neuenhausen
8e29b925cb
Split out PHY init into esp-phy crate. (#3892)
* Minimal infrastructure

* Implemented dig reg backup.

* usb bbpll

* Removed default feature.

* OS adapter tweaks

* Fixed S2 and implemented PhyController

* Added manual deinit.

* Fixed linker scripts and migrated esp-radio to esp-phy

* Fixed warnings.

* Fixed NPL

* Tried fixing NPL again

* Fixed ieee802154

* Fixed reading chip version of S3.

* fmt

* Added changelog entry

* Added changelog for esp-radio

* Deleted chip specific common adapters.

* Added docs and unstable

* Migrated cal data load/store to esp-phy

* Fixed PHY cal CI error

* Removed instability

* Removed feature from esp-phy

* fmt

* Fixed esp-sync docs.

* Removed log with CONFIG

* Removed nonreentrantmutex from common adapter

* Disable reset for radio blocks where required.

* Fixed cfg_if for s2

* fmt

* Added bt_bb_v2_init_cmplx to phy_provides.x

* Added CHANGELOG

* Moved EXTERN and fixed comment.

* Fixed lint

* Fixed common adapter again.

* Docs and Readme.

* Fixed ref count.

* This time pls.

* Added MAC time update CB for esp-radio

* fixed field init

* Fixed inconsistency in metadata

* Removed useless changelog entry

* Fixed S2.

* Swaped addr_of for &raw mut

* Properly initialize NVS

* Fixed lint

* Fixed C6

* Fixed remaining issues

* Fixed CI

* Added link

* Updated esp-wifi-sys in esp-phy

* Address reviews

* Renamed PHY lock

* Moved syscon let in common_adapter

* Fmt

* Remove critical_section

* Don't steal when not necessary

* Added esp-phy changelog to workflow

* Add cargo metadata for esp-phy

* Added reference to #4015

* Refixed Cargo.toml

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-19 14:14:25 +00:00
Dániel Buga
83105b4dbb
Replace some inline ASM with xtensa_lx implementations (#4144)
* Fix incorrect uses of wsr.intset

* Also use interrupt::clear

* Also replace wsr.vecbase

* Remove cause_sw_intr_to_core from C3/S3
2025-09-19 11:52:33 +00:00
Dániel Buga
69776eb638
Even more cargo-batch, encode configs in Cargo.toml (#4134)
* Abstract out LP-core targeting packages

* Encode targets_lp_core in Cargo.toml

* Encode architecture compatibility in Cargo.toml

* Move semver_checked into Cargo.toml

* Cache parsed tomls

* Parse simple feature sets from Cargo.toml

* Move all basic feature rules to Cargo.toml

* Add check configs

* Limit command length on Windows

* Update cargo.rs

* Add clippy configs

* Use a single syntax, use a single doc-config line

* Fix known problems

* Run cargo check in CI command

* Fix more problems

* Fix esp-storage
2025-09-18 16:15:35 +00:00
Dániel Buga
646495eb16
Runtime wifi config options (#4121)
* Turn country code and default power mode into runtime configs

* Move G_CONFIG setup to wifi::new

* Turn most configs into runtime options

* Set core ID to current one

* Mark most options unstable
2025-09-17 08:13:18 +00:00
Björn Quentin
89b81a2f8e
update radio blobs (#4113)
* update radio blobs

use esp-wifi-sys 0.8.2

* CHANGELOG.md

* fmt

* Address review

* Address review comments

* Address review comments
2025-09-17 06:59:00 +00:00
Dániel Buga
9d596ca752
esp-radio: remove scheduler lifecycle management, remove idle task (#4093)
* Start scheduler on preempt init, remove deinit

* Static-allocate the main task context

* taskless idle

* Remove the need for an idle task
2025-09-15 12:47:39 +00:00
Juraj Sadel
c1c226a20d
esp-radio: Add BuilderLite for EapClientConfig (#4115)
* esp-radio: Add BuilderLite for EapClientConfig

* changelog
2025-09-15 10:58:15 +00:00
Juraj Sadel
a5a0833318
Add a CI workflow for checking links in .rs, .md, and .toml files acc… (#4098)
* Add a CI workflow for checking links in .rs, .md, and .toml files accross esp-hal workspace

fix dead links

* exclude unpublished crate documentation's links

* Add .lycheeignore with excluded links

* play with patterns

* don't forget to remove
2025-09-12 10:48:04 +00:00
Kirill Mikhailov
b01f444822
Implement Error trait more (#4097)
* Implement `Error` trait more

fmt

* oi

* fix
2025-09-11 11:17:29 +00:00
Dániel Buga
d16b68396c
Try to explain preempt needs (#4092) 2025-09-11 08:37:21 +00:00
Dániel Buga
cf80e6a8f1
Implement priority levels (#4090)
* Add priority to tasks

* Separate Mutex out of counting Semaphore

* Add priority inheritance to mutexes

* Test priority inheritance, fix issues

* Compare against the owner's current priority
2025-09-11 08:03:44 +00:00
Jesse Braham
6f033666c8
Move RTC clock enums/structs to clock module (#4089)
* Move RTC clock enums to `clock` module and fix naming violations

* Move `RtcClock` to `clock` module

* Update migration guide

* Update `CHANGELOG.md`

* Remove invalid attribute from enum variant
2025-09-10 09:47:07 +00:00
Dániel Buga
35e208236a
Add wait queues to semaphore/queue (#4086)
* Add wait queue to semaphores

* Spawn idle task, prevent re-waking a ready task

* Add wait queues to queues

* Clean up wait queues

* Remove task from wait queue on timeout/resume

* Do not re-schedule deleted task

* Implement simple stack overflow detection

* Task deletion: remove task from queues in one place

* Fix storing context into freed memory

* Restore idle task stack size

* Undo alloc changes

* Don't let task sleep if wakeup time is in the past

* Improve codegen of esp_preempt_now
2025-09-10 07:24:25 +00:00
Juraj Sadel
36634a4f92
Add Protocols to ClientConfig and EapClientConfig and apply them (#4080) 2025-09-09 10:06:26 +00:00
Dániel Buga
779f7a874f
esp-preempt: don't switch to sleeping tasks (#4081)
* Separate the alloc and run lists

* Replace circular task list with ready queue

* Remove separate SCHEDULER_STATE static

* Move scheduler to new file

* Reorganize, allow restarting scheduler

* Fix InternalMemory polyfill

* Use SingleShotTimer internally

* Implement a simple timer queue

* Extract run queue, wake tasks, store reason of scheduler event

* Add inherent function to get current task ptr

* Reimplement usleep with the timer queue

* Store current task in timer queue

* Sleep in timer queue task

* Remove ability to sleep arbitrary tasks

* More logging

* Clear timer interrupt in timer handler

* Even more logging

* Merge mutexes into semaphores
2025-09-09 09:57:35 +00:00
Dániel Buga
779228ef28
Tweak driver to better model FreeRTOS APIs (#4076) 2025-09-08 12:44:29 +00:00
Dániel Buga
2b906e5b47
preempt - Abstract away blob ticks (#4063)
* Fix sleep

* Remove unused timeout from mutex_lock

* Abstract away blob ticks

* Update esp-radio/src/time.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Don't sleep for 10s

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-08 11:36:04 +00:00
Björn Quentin
27c89c3adc
Fix wifi event names (#4065)
* Fix wifi event names

* CHANGELOG.md

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-09-08 07:09:04 +00:00
Björn Quentin
7248d3d7d2
Make BLE work on ESP32-C2 with 26 MHz Xtal (#4062)
* Make BLE work on ESP32-C2 with 26 MHz Xtal

* CHANGELOG.md
2025-09-05 17:04:39 +00:00
Dániel Buga
445f6fc1ad
Add task priority to the preempt driver (#4064) 2025-09-05 16:30:16 +00:00
Dániel Buga
24d2122c14
Remove ConcurrentQueue & other minor tweaks (#4058)
* Remove ConcurrentQueue

* Unrequire preempt driver for 802.15.4
2025-09-05 14:59:08 +00:00
Björn Quentin
105c163306
Remove pointless functions (#4060)
* Remove pointless functions

* CHANGELOG
2025-09-05 14:10:43 +00:00
Jesse Braham
67e0b65ee4
Add a note regarding running on the second core to esp-radio documentation (#4037) 2025-09-05 11:59:13 +00:00
Jesse Braham
9be325cf83
Remove migration guides for old package versions (#4048) 2025-09-05 11:10:22 +00:00
Dániel Buga
61ad37dd8e
Add timers to preempt (#4053)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-05 09:37:16 +00:00
Dániel Buga
68a16055fc
Fix 802.15.4 (#4056) 2025-09-05 09:29:43 +00:00
Dániel Buga
a84d3cc89f
Make timekeeping the driver's job (#4047) 2025-09-05 07:31:40 +00:00
Dániel Buga
cf2b162517
Add queues to esp-preempt (#4043) 2025-09-04 15:26:51 +00:00
Kirill Mikhailov
38fd991ff7
More cleanup in esp-radio (#4040)
* More cleanup in `esp-radio`

* misc

* address reviews

* docs update

* fmt
2025-09-04 14:03:19 +00:00
Juraj Sadel
34b908dc56
Remove wifi_state and split WifiState into WifiStaState and WifiApState (#4046)
* Remove wifi_state adn split WifiState into WifiStaState and WifiApState

* MG

* changelog

* review
2025-09-04 11:28:00 +00:00
Dániel Buga
7305bc08dc
Add wifi init test case, fix logic bug in wifi::new (#4050) 2025-09-04 11:10:40 +00:00
Dániel Buga
2e958d2bb7
Move mutexes to esp-preempt (#4041) 2025-09-04 07:38:43 +00:00
Dániel Buga
cc91bb1c9e
Move semaphore implementation to esp-preempt (#4038) 2025-09-03 14:21:47 +00:00
Dániel Buga
99e2b936df
Introduce esp-sync, avoid critical_section like the plague (#4023)
* Introduce esp-sync

* Avoid critical_section as much as possible
2025-09-03 09:34:18 +00:00
Juraj Sadel
fe0a04517f
General esp-radio cleanup (#4017)
* General esp-radio cleanup

* changelog

* MG

* fix build error

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-02 16:48:17 +00:00
Björn Quentin
a337554ea1
Make internals private (#4029)
* Make internals private

* CHANGELOG.md
2025-09-02 15:57:36 +00:00
Juraj Sadel
5f0f7cd573
Fix esp-wifi examples (#4014) 2025-09-01 12:54:29 +00:00
Björn Quentin
854941f1b0
Integrate 802.15.4 into esp-radio more (#4003)
* Integrate 802.15.4 into esp-radio more

* Fix H2

* fmt

* Fix

* Deny combination of 802.15.4 and Wi-Fi
2025-08-29 13:10:49 +00:00
Björn Quentin
b5a7397134
Add a way to get/set calibration data (#4001)
* get/set calibration data

* Simplify

* Rename

* Update CHANGELOG.md
2025-08-28 16:30:34 +00:00
Juraj Sadel
6f713c357b
API improvements (#3994)
* API improvments

* MG and changelog
2025-08-27 12:51:25 +00:00
Juraj Sadel
e6cdd8eb3c
Add xtask command check-unused-deps and remove unused deps/features (#3967)
* Add xtask command check-unused-deps and remove unused deps/features

* fix changelog

* reviews, move check into nightly-ci

* reviews

* readd document-features to esp-preemt

* Just cargo machete
2025-08-27 08:48:58 +00:00
Björn Quentin
4a8315191b
Clarify the meaning of the coexist feature (#3987)
* Clarify the meaning of the coexist feature

* Update esp-radio/Cargo.toml

Co-authored-by: Dániel Buga <bugadani@gmail.com>

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-08-26 09:43:48 +00:00
Jesse Braham
5e1648f338
Minor documentation improvements for esp-radio (#3986)
* Use correct spelling/case for Wi-Fi in docs

* Link to functions mentioned in doc comments
2025-08-26 08:44:45 +00:00
Jesse Braham
4bfd7a28b6
Mark various enums/structs as #[non_exhaustive] (#3981)
* Mark various enums/structs as `#[non_exhaustive]`

* Update `CHANGELOG.md`
2025-08-25 09:47:56 +00:00
Jesse Braham
bc13bf40f3
Miscellaneous esp-radio cleanup and documentation improvements (#3973)
* Refactor `os_adapter` into directory module

* Clean up Cargo manifest a bit

* Add and improve documentation for `wifi` module

* Address review comment
2025-08-22 10:34:49 +00:00
Juraj Sadel
0ce9a1c5e7
Split the wifi feature into wifi-ap, wifi-sta and wifi-eap (#3924)
* Split wifi feature into wifi-ap, wifi-sta and wifi-eap

* changelog

* Revert most of the changes, keep wifi and wifi-eap features only

* wifi-eap is unstable, include this feature into CI tests and documentation
2025-08-21 09:47:42 +00:00
Jesse Braham
a7673b35f7
Remove scan_*_max and scan_n* functions from esp-radio (#3963)
* Remove `scan_*_max` and `scan_n*` functions

* Derive `BuilderLite` for `ScanConfig`

* Update migration guide for `esp-radio`

* Update changelogs
2025-08-20 13:22:26 +00:00
Juraj Sadel
7534606ab6
esp-radio: Hide C-types from public API (#3907)
* Hide C-types from public API

* Add accessories for all events
2025-08-19 13:43:39 +00:00
Scott Mabin
7c944ec939
s/esp-radio-preempt-baremetal/esp-preempt/g (#3938)
* s/esp-radio-preempt-baremetal/esp-preempt/g

esp-preempt will hopefully one day be more useful than just a scheduler
for esp-radio, therefore I've removed the radio prefix for that future
goal. I also felt that baremetal didn't really add much other than
noise, so I've removed that postfix too.

* fix xtask

* remove test code

* fixups
2025-08-15 13:52:42 +00:00