210 Commits

Author SHA1 Message Date
Juraj Sadel
cbdb4f05ba
Fix nightly CI (#3755)
* fix nightly ci

* reviews
2025-07-10 11:00:14 +00:00
Simon Neuenhausen
3d6e522cbc
Allow splitting control over modem clocks. (#3687)
* Minimal architecture for split RCC.

* Removed critical section.

* Add all modem clock controllers and adjust esp-ieee802154.

* Fixed incorrect cfg.

* Fixed unstable attribute usage.

* Replaced AtomicU8 with Cell<u8>

* Reverted example channel back to 15

* Added unstable attribute to ModemClockController impls.

* Remember to actually increase the ref count.

* Experimentally removed RadioClockController

* Merged ref counters and made decrease panic if zero is reached.

* Removed RADIO_CLK peripheral.

* Removed RADIO_CLK again.

* Revert "Removed RADIO_CLK again."

This reverts commit 6da2d2834850068aa21bc52b141de2cfd8154acc.

* Removed RADIO_CLK without reformatting the files.

* Applied changes to examples and hil-tests.

* Fixed OS adapter for C2 and H2

* Adjusted docs and used unwrap!

* Fixed comments.

* Added changelog.

* Fixed esp-wifi for esp32h2.

* Changed comment for PHY_CLOCK_REF_COUNTER.

* Fixed lint for esp32c2.

* Update esp-hal/src/clock/mod.rs

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

* Update esp-hal/src/clock/mod.rs

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

* Removed unnecessary comments and made init_radio_clocks unstable.

* Update esp-hal/src/clock/mod.rs

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

* Fixed lint.

* Removed clocks_ll functions for chips that don't have those peripherals.

* fmt

* Changed modem clock controller stealing.

* Added lifetime

* fixed peripheral stealing again

* Made modem_clock_controller not const.

* Used type alias instead of function for peripheral stealing.

* fmt

* Adjusted remaining comments.

* Added note about coex.

* fmt

* misc

* Revert "misc"

This reverts commit d8740421e0dff84af605160939e246f2308a48e1.

* Regenerated esp metadata

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-07-08 17:23:55 +00:00
Björn Quentin
41fed590c2
Requires unstable feature (#3772)
* Add `requires-unstable` feature

* Docs

* CHANGELOG.md

* Advise for library authors
2025-07-08 11:40:06 +00:00
Dániel Buga
692a768b3a
Introduce esp-metadata-generated (#3754)
* Move macros to new crate

* Generate a single file

* Pre-generate esp-metadata-generated

* Move saving code to xtask

* Format with both rustfmt and prettyplease

* Fix doc build

* Unhide macros

* Fix doc string

* Update semver-check baseline
2025-07-07 15:37:05 +00:00
Dániel Buga
c6df02190b
Use 1.88 & bump HAL MSRV (#3742)
* Update MSRV to 1.88

* Clean up lints

* Generate new baseline

* Bump MSRV of xtensa-lx-rt

* Do not try to replace in semver baseline, bump dependent msrvs

* Changelog
2025-07-03 13:44:27 +00:00
Dániel Buga
517b5ccbe2
Make cargo xfmt respect the format config (#3739)
* Make cargo xfmt respect the format config

* Make sure comments and doc code have the same width
2025-07-03 08:18:02 +00:00
Björn Quentin
b76a738263
Improve esp-wifi cfg docs (#3733) 2025-07-02 08:53:48 +00:00
Dániel Buga
745cfd71b6
de-paste! the any_peripheral macro (#3699)
* Stop using paste in any_peripheral

* Drop unused macro

* Generate a delegate macro for any-peripheral dispatching

* Fix up PDMA
2025-07-01 13:48:40 +00:00
Björn Quentin
cc2083fd1a
Introduce esp-rom-sys crate (#3688)
* Move ROM function definitions to esp-hal-rom crate

* Patch ESP32 ROM-functions, use it in esp-storage

* Allow placing additional code in IRAM

* esp-storage depends on esp-hal-rom

* Move ROM function wrappers from esp-hal to esp-hal-rom

* Make bootloader-support crate use CRC ROM function

* Minor polishing

* changelogs

* Make CI green

* Define (some) spiflash ROM functions in esp-hal-rom

* Lint

* Avoid duplicate definition of `__assert_func`

* Rename to `esp-rom-sys`

* Mention versioning this crate in the README

* Fixes

* Check self-version

* Docs

* Clippy

* Check if version bump is allowed

* Unconditionally place spiflash ROM function patches (if present) in rwtext

* Cleanup

* Change how unacceptable version bump requests are detected

* Initial version 0.1.0

* Docs

* Use correct version

* Force esp-rom-sys bumps to patch

* Fix
2025-07-01 13:05:01 +00:00
Björn Quentin
99042a7d60
Don't lie about the MSRV (#3692)
* Don't lie about the MSRV

* Don't mention MSRV in xtensa-lx-* docs
2025-06-25 11:20:52 +00:00
Dániel Buga
29ac33f2a0
Disallow log and defmt at the same time (#3675) 2025-06-23 12:44:21 +00:00
Björn Quentin
b87cd34456
Define configs in YAML files (#3504)
* Define configs in YAML files

* Fix error message string

* Cleanup

* Fix rebase

* Experiment: Value is String

* More i64 -> i128

* More i64 -> i128

* yml -> yaml

* Clippy

* Expect

* Test more

* Explicit `trunc`

* fmt

* Typo

* `is_tooling` -> `ignore_feature_gates`

* Fix

* Briefly explain the config format

* Evaluate conditions in order, first match wins

* Address review

* Move evalexpr I128 support into separate file
2025-06-17 08:13:15 +00:00
Dániel Buga
c15fc6773e
Esp32: ensure wifi data comes before bss (#3635)
* Place wifi data before bss

* Minor fixes

* Changelog

* Fix the stack guard's address
2025-06-13 08:28:29 +00:00
Gabriel Hansson
1b5a85e7d6
chore: remove unused esp-build dependency listings (#3625) 2025-06-12 13:42:26 +00:00
Dániel Buga
db3eb3da95
Remove hand-defined radio symbols (#3632) 2025-06-12 13:04:36 +00:00
Juraj Sadel
7c322ec31c
esp-wifi and esp-storage can be used with opt-level=s (#3618) 2025-06-10 09:31:25 +00:00
Björn Quentin
3893e5665b
Remove global wifi/ble init state tracking (#3553)
* Remove global wifi/ble init state tracking

* CHANGELOG.md

* Remove (now) redundant clippy-allow

* Cleanup after rebase

* Fix CHANGELOG

* Rebase

* Remove unused
2025-06-10 09:31:11 +00:00
Scott Mabin
e3f847c9c8
Post release rollover (#3616) 2025-06-09 15:45:06 +00:00
Scott Mabin
d34aab3ecd
Finalize crates for release (#3603) 2025-06-05 14:25:01 +00:00
Anthony Grondin
a6cd292e1d
feat(esp-wifi): Add fetching RSSI by wrapping esp_wifi_sta_get_rssi() (#3593)
* feat(esp-wifi): Add fetching RSSI by wrapping `esp_wifi_sta_get_rssi()`

* Add CHANGELOG.md entry

* Return an error if calling WifiController::rssi(&self) while running in AP mode.
2025-06-05 11:41:26 +00:00
Björn Quentin
75f728aec9
esp-wifi: Fix ble + coex + defmt for ESP32 (#3596)
* Make CI fail as it should

* Fix ESP32 + defmt + ble + coex

* CHANGELOG
2025-06-04 14:26:59 +00:00
Scott Mabin
3cd36062d4
Finalize crates for release (#3588) 2025-06-03 12:30:48 +00:00
Dániel Buga
f5287c3ef9
Remove note about fixed cargo bug (#3105)
* Remove note

* Remove workaround

* Fix MSRV changelogs
2025-06-02 13:51:36 +00:00
Dániel Buga
5992933ca7
Simplify esp-wifi timer code (#3576)
* Simplify esp-wifi timer code

* Reserve and use FROM_CPU_INTR2 on RISC-V
2025-05-30 11:35:59 +00:00
Dániel Buga
3fec3376a4
Disable timer as part of preempt::disable (#3575) 2025-05-30 08:06:17 +00:00
Scott Mabin
e97de69b42
use 1.87 in CI, bump MSRV to 1.86 (#3560)
* use 1.87 in CI, bump MSRV to 1.86

* update API baseline files (rustdoc json format change)

* Add api-baseline regen guide to guidelines
2025-05-29 13:45:22 +00:00
Björn Quentin
0f4b29d49d
No need to ref-count wifi anymore (#3550)
* No need to ref-count wifi anymore

* CHANGELOG.md
2025-05-26 11:29:36 +00:00
chrysn
60512a3f6d
Update enumset dependency to enable defmt (#3490)
* Update enumset dependency to enable defmt

* fixup! Update enumset dependency to enable defmt
2025-05-21 12:40:15 +00:00
Dániel Buga
3d29a8765a
Add a version placeholder and replace on version bump (#3485)
* Use a version placeholder in MGs

* Replace version placeholder in package files

* Document bump-version better
2025-05-20 11:58:49 +00:00
Dániel Buga
74de9d65d6
Update allocator_api2 (#3487) 2025-05-19 07:38:07 +00:00
Dániel Buga
fbdb99ec6a
xtask: Bump version in changelog, add check-changelog (#3478)
* Parse and update changelog on version bump

* Add check-changelog

* Fix changelogs

* Check changelog format in CI

* Fix log string

* Update readme

* Add tests, remove empty changelog groups
2025-05-19 07:15:47 +00:00
Björn Quentin
ca07fbc5df
Make esp-config structs de-serialization friendly (#3455)
* Make esp-config's structs de-serialization friendly

* Simplify ConfigOption's constructor

* CHANGELOG.md

* Make sure `esp-wifi/build.rs` formats correctly

* Typo

* Run tests, again

* Tests
2025-05-08 08:01:21 +00:00
Dániel Buga
eb7cbfcd08
Use esp-metadata to detect BT/WIFI availability (#3468) 2025-05-07 13:37:15 +00:00
Dániel Buga
5df246c702
Rely on esp-metadata for chip feature check (#3447) 2025-05-06 08:11:53 +00:00
Dániel Buga
16897bb68d
Tweak features and dependencies (#3425)
* Group optional dependencies

* Separate version from crate name

* Restore defmt-log mutual exclusivity

* Gate ufmt

* Remove usb-device

* Feature-gate unsable dependencies behind unstable

* S2: assume single core for portable-atomic

* Clean up feature flag docs

* Sack debug

* Fix clippy

* Update examples

* Fix usb-otg feature

* Fix fmt

* Add version to log dep

* Also mark bluetooth private

* Correct changelog/MG

* Clean up esp-hal-embassy

* Clean up ieee802154

* Clean up esp-println

* Move the timestamp function up

* Move info from readme to feature docs

* Clean up esp-storage

* Clean up esp-wifi

* Fix examples

* Add a note for the private features
2025-05-05 11:33:55 +00:00
Björn Quentin
743664dd6b
esp-wifi: Support calibration modes other than FULL (#3383)
* Have one place for phy calibration

* Offer phy calibration modes other than FULL

* Add config for initial power save mode

* CHANGELOG.md

* Fixes after rebase

* Remove initial-power-save-mode

* Rebase adjustments
2025-05-01 12:54:50 +00:00
Dániel Buga
f497b75ee8
Clean up esp_hal_embassy timebase documentation (#3444)
* Clean up systimer conditional cfgs

* Seal and clean up e-h-embassy timebase

* Remove separate collection trait

* Panic if EmbassyTimer::init is called multiple times

* Changelog

* Make documentation respect ESP32
2025-05-01 09:57:29 +00:00
Sergio Gasquez Arcos
ab18d89470
fix: Nightly issues (#3434) 2025-04-28 11:41:35 +01:00
Dániel Buga
b1f487093b
Update dependencies (#3416) 2025-04-24 13:41:20 +00:00
Björn Quentin
11ff06a368
Fix esp32 coex (#3403)
* Make sure to enable relevant interrupts

* Fix more

* Make `current_runlevel` public

* Check that interrupts are enabled when initializing

* Try to be more honest in `is_in_isr`

* Adjust log levels

* Really fix ESP32 COEX

* Improve COEX example

* fmt

* CHANGELOG

* CHANGELOG

* Clarify on `esp_bt_controller_config_t`

* Take INTENABLE into account

* Test esp-wifi init fails

* Simplify test code

* Clarify comment

* fmt

* Rename

* Adapt the test

* Revert unrelated changes (esp_bt_controller_config_t)

* Align Xtensa (current_runlevel)

* Additional test

* Change test
2025-04-24 11:39:07 +00:00
Björn Quentin
934bf818fc
Fix s2 enterprise wpa (#3406)
* Don't use `strcasecmp` from ROM

* fmt

* CHANGELOG
2025-04-24 08:37:04 +00:00
Kirill Mikhailov
b33b877592
Bump edition to 2024, bump MSRV to 1.85 (#3391)
* inter-state

* inter-state (2)

* warnings fix

* fix warnings

* fmt + changelogs

* another unsafe extern "C" doode

* real fmt now

* MSRV + format

* Ignore unsafe_op_in_unsafe_fn lint for now in esp-hal and esp-wifi

* msrv + fmt

* ugh....

* get lcd_cam example right

* expr_2021 -> expr experiment

* gagagugu

* reviews

* more unneeded unsafes (help)

* finish esp-hal unsafe cleanup

* each unsafe call is marked separately

fmt

* should be good now (?)

* piece was never an option...

* dumb
2025-04-22 10:39:11 +00:00
Dániel Buga
f034f827b3
Only provide relevant config options (#3371)
* Only display/accept relevant config options

* Only offer xtal-frequency for 32 and S2
2025-04-14 10:41:47 +00:00
Dániel Buga
a98a96821b
Fix ieee802154 lint errors, allow log+defmt (#3374) 2025-04-14 07:17:34 +00:00
Dániel Buga
014db9bc7e
Define unstable config options (#3365)
* Add stability to config options

* Reject unstable options

* Add note to docs

* Use enum validator in e-h-embassy

* Generate a list for enumerated values

* Don't allow line-wrapping headers

* Center default/allowed values

* Changelog

* Display stability under name

* Remove - from Allowed value when option has no constraints

* Mark more options as unstable

* Include a hint in the unstable error
2025-04-11 15:00:13 +00:00
Dániel Buga
c92d0d3667
Make sure the default power saving mode is applied by default (#3370) 2025-04-11 10:47:32 +00:00
Juraj Sadel
0e7b1c3b8d
fix my mess (#3368) 2025-04-11 09:55:23 +00:00
Björn Quentin
1c74bc2adf
Misc esp wifi (#3364)
* Allow `Configuration::None`

* esp-wifi: set country early

* CHANGELOG.md

* Set power-save-mode to None initially
2025-04-11 08:25:17 +00:00
Dániel Buga
2aac175f77
Refactor esp-config (#3362)
* Extract value and validator modules

* Clean up

* Replace tuples with ConfigOption

* Move generate.rs

* Further refactor write_doc_table_line

* Carry around the config option, too

* Move markdown table processing out of random places

* Compare prettified json, use pretty_assertions to diff it

* Work with Vec

* Emit enumerated cfgs in one place
2025-04-11 05:30:58 +00:00
Dániel Buga
70e3f2ca26
Make sure INTERRUPT_CORE0 is referenced (#3336)
* Make sure INTERRUPT_CORE0 is referenced

* Test esp-wifi without radio features

* Allow linting with multiple lists of features

* Just don't bother

* Changelog
2025-04-07 11:07:42 +00:00