69 Commits

Author SHA1 Message Date
Scott Mabin
6b758d75b8
Finalize releases (#3805)
* Finalize crate releases

* changelog fixup

* fixup docsrs ci test

* docs fixup
2025-07-16 10:29:34 +00:00
Scott Mabin
6db771c80e
(re-)introduce the rt feature on esp-hal (#3706)
Adds the `rt` feature which disables `esp_hal::init` and removes
runtime symbols from the global name space.

Disabling the `rt` feature is the recommended way to use esp-hal as a
library.
2025-07-15 09:20:26 +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
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
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
2438d03b21
Simplify generated code to save on build time, yeet a few dependencies (#3643)
* Reduce use of iter::chain

* Cache all symbols

* Trim xtensa-lx-rt deps

* Remove unused dep

* Replace chrono with jiff

* Yeet minijinja

* Save a bit on toml_edit

* Disable some default features

* Disable regex log filters

* Reduce xtensa-lx-rt build script

* Remove unnecessary dependencies

* Remove darling

* Update embedded-test

* lol

* Clean up

* Only validate loaded config once

* fmt

* Changelog
2025-06-17 20:35:00 +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
Scott Mabin
e3f847c9c8
Post release rollover (#3616) 2025-06-09 15:45:06 +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
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
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
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
Dániel Buga
b1f487093b
Update dependencies (#3416) 2025-04-24 13:41:20 +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
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
9db968b473
Remove Peripheral/PeripheralRef (#3305)
* Rework GPIOs without Peripheral/PeripheralRef

* Completely remove Peripheral/Ref

* Remove lifetime from DMA Channel structs

* Try to document changes

* Explain reborrow

* Add lifetime to Instance traits, make them public

* Add Trace to changelog

* Remove lifetimes from Instance traits

* Rewrite section about singletons

* Remove unintended doc comment

* Remove inherent degrade

* Fix reiniting esp-wifi

* Add examples to the root-level docs
2025-04-03 10:40:07 +00:00
Dániel Buga
76083289cf
Annotate macros with collapse_debuginfo(yes) (#3323)
* Enable esp-wifi/defmt if tests want defmt

* Annotate log macros with collapse_debuginfo
2025-04-02 14:26:22 +00:00
Sergio Gasquez Arcos
d65497de59
Update documentation links (#3244)
* docs: Update documentation links

* docs: Update docs.rs badges
2025-03-14 09:01:31 +00:00
Björn Quentin
38eb5aefc9
Xtask/latest redirect (#3231)
* Support "build-documentation-index --serve"

* Support `/latest` in generated docs

* `/latest` vs `/latest/`

* Update documentation field
2025-03-07 11:28:41 +00:00
Sergio Gasquez Arcos
3816de0d87
Update documentation links (#3197)
* feat: Update documentation links

* feat: Add documentation field to Cargo.toml
2025-03-03 10:58:03 +00:00
Jesse Braham
fd2bdefaab
New package releases (#3163)
* Update dependencies and bump version numbers

* Update `CHANGELOG.md` for each package being published

* Update repo-level `README.md`

* Use older nightly to resolve CI issues

* also release esp-backtrace and esp-metadata

* Cleanup

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2025-02-24 13:32:29 +00:00
Björn Quentin
68c660f1c5
CI optimizations (#3129)
* CI Improvements

* Fix

* Lint with stable

* Fix

* Xtensa

* cleanup
2025-02-13 15:20:10 +00:00
Jesse Braham
ca8cfe6a1f
Fix nightly CI errors (#3123)
* Update nightly CI workflow

* Fix nightly clippy errors
2025-02-10 09:42:05 +00:00
Dániel Buga
715e447a47
Radio clock refactor (#3100)
* Move RadioClockController impls to clock

* Replace trait with driver

* Remove docs that are no longer meaningful

* Update esp-ieee802154

* Refcount phy clock
2025-02-05 16:58:36 +00:00
Dániel Buga
0894e301c9
Replace pointer derefs with regs function (#2974)
* Do not mix peripheral singletons with PAC types

* Replace pointer derefs with regs function
2025-01-20 08:30:05 +00:00
Jesse Braham
59a2c17a52
New package releases (#2959)
* Fix some styling issues in top-level README.md

* Update package dependencies and bump version numbers

* Update each `CHANGELOG.md` file for packages to be published

* Update `esp-hal` migration guide

* Fix typo in `esp-hal` changelog
2025-01-15 11:37:36 +00:00
Jesse Braham
e6c38c59b7
Bump MSRV of all packages to 1.84, add MSRV policy to each README.md (#2951)
* Various top-level `README.md` updates

* Set MSRV to 1.84.0 for all packages

* Add MSRV policy to each `README.md`

* Update each `CHANGELOG.md`
2025-01-14 11:01:28 +00:00
Kirill Mikhailov
8d948ba017
Mark unstable modules, make macros private (#2900)
* Mark unstable APIs + make `macros` private

* address reviews

* use `instability` instead of feature

* fix dependencies

* More tagging

* `Persistable` and `procmacros` - unstable

* Adjust for changes

* sure...
2025-01-10 14:32:34 +00:00
Dániel Buga
337b3cc6b7
Use _CONFIG_ to separate config prefix and key (#2848)
* Use two underscores to separate prefix

* Change separator to _CONFIG_

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2025-01-03 14:36:30 +00:00
Sergio Gasquez Arcos
06a15807e3
Fix C-METADATA violations (#2874)
* fix: C-METADATA violations of esp-hal

* feat: Normalize keyword and categories for most of the pacakges
2025-01-02 09:44:27 +00:00
Dániel Buga
7f8af8a651
Remove prelude (#2845)
* Remove prelude

* Changelog
2024-12-20 10:24:57 +00:00
Scott Mabin
85d30e9816
Updates for Xtensa enabled 1.83 compiler (#2615)
* test ci

* fix ci with new compiler

* god bless clippy fix

* refmuts

* clippy

* tests work

* use new compiler

* use new compiler

* bump MSRV of esp-hal and crates that depend on esp-hal

* fix eyesore

* clippy again

* remove hardcoded compiler version

* bump rust-version as well

* note MSRV bump in changelog
2024-12-17 15:02:03 +00:00
Dániel Buga
5135965116
Hide most of the unstable peripherals (#2667)
* Hide most of the unstable peripherals

* Lint with correct toolchain, lint with unstable enabled

* Require unstable feature and lint using it

* Auto-lint xtensas with esp toolchain

* Fix msrv and ieee802154

* Add feature to examples

* Don't require building ieee802154 for all examples

* Mark modules in documentation
2024-12-06 11:03:56 +00:00
Jesse Braham
bdfec3781f
New package releases (#2569)
* New package releases

* Update `CHANGELOG.md` for all packages to be published
2024-11-20 09:16:33 +00:00
Jesse Braham
92b91257e9
Remove get_ prefix from functions (#2528)
* Remove `get_` prefixes from functions

* Update migration guides for `esp-hal` and `esp-wifi`

* Update `CHANGELOG.md` files
2024-11-13 15:40:26 +00:00
Jesse Braham
cf10f07a9e
Add validation to esp-config (#2475)
* Clean up and re-organize `lib.rs` a bit (sorry)

* Add configuration validation, some other refactoring/improvements

* Add a built-in range validator, re-document the `generate_config` function

* Update build scripts to reflect new configuration API
2024-11-12 10:14:14 +00:00
Jesse Braham
33659380dd
Update revision of PACs and fix all build errors (#2515) 2024-11-11 21:27:50 +00:00
Jesse Braham
fc4eaa1ebf
Make our nightly CI checks pass (#2356)
* Fix nightly lint errors for ESP32-C2

* Fix nightly lint errors for ESP32-C3

* Fix nightly lint errors for ESP32-C6

* Fix remaining nightly lint errors
2024-11-01 10:31:56 +00:00
Björn Quentin
05a1ebead3
Use esp-wifi-sys from Git (#2426)
* Use esp-wifi-sys from Git

* Update esp-wifi-sys rev
2024-10-30 16:38:16 +00:00
Alexandra Clifford
a15cfe7f21
Make RX queue size configurable (#2324) 2024-10-15 07:38:09 +00:00
Scott Mabin
f29d539a78
Prepare new radio related releases (#2328) 2024-10-10 12:20:52 +00:00
Jesse Braham
d655fe665f
New package releases (#2310)
* Bump version numbers of all packages to be published, update deps as needed

* Update all `CHANGELOG.md` files

* Update migration guide headings
2024-10-10 10:19:04 +00:00
Dániel Buga
f93efa73a9
Clean up warnings (#2317) 2024-10-09 14:53:32 +00:00
Björn Quentin
81f93698b0
Remove unused dependencies (#2306) 2024-10-08 13:49:49 +00:00