58 Commits

Author SHA1 Message Date
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
Ulf Lilleengen
a7bd8980ea
chore: update esp-radio dependency on bt-hci (#3920)
* chore: update esp-radio dependency on bt-hci

* Apply suggestion from @playfulFence

Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com>

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com>
2025-08-11 08:29:16 +00:00
Björn Quentin
46fd87347a
Don't panic in build.rs when using RA with rustc-wrapper (#3904) 2025-08-06 19:21:04 +00:00
Björn Quentin
4dac7bafe2
RISCV: Don't pass TrapFrame into interrupt handlers (#3903)
* RISCV: Don't pass TrapFrame into interrupt handlers

* CHANGELOG.md

* Fix

* Remove the fake-trapframe
2025-08-06 13:44:13 +00:00
Björn Quentin
3ab3490d62
Move malloc etc to esp-alloc, common C functions to esp-rom-sys, define "C functions" in esp-radio weak (#3890)
* Provide malloc, free and friends in esp-alloc

* Mute warning

* Remove some (now unused) global symbols

* Have a way to opt-out of esp-alloc's malloc,free etc.

* Fixes

* Move some common C functions from esp-radio to esp-rom-sys

* Fix

* Make esp-readio symbols weakly linked

* CHANGELOG.md

* Align MSRV, cleanup visibility

* Init before `assume_init`

* Linker script fixes

* Fix examples

* Remove heapless - esp-radio is alloc

* Fix examples

* Whitespace

* realloc_internal

* Make `__esp_radio_putchar` a no-op if `sys-logs` is not enabled
2025-08-05 11:58:31 +00:00