15 Commits

Author SHA1 Message Date
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
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
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
5df246c702
Rely on esp-metadata for chip feature check (#3447) 2025-05-06 08:11:53 +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
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
c8822b4f83
Restore multiple-integrated timer queues (#3166) 2025-02-28 13:02:58 +00:00
Dániel Buga
a5bfa3a61d
Disable multiple-integrated timer queue flavour (#3159) 2025-02-21 10:01:05 +00:00
Dániel Buga
571760884b
Update our time driver for upcoming embassy changes (#2701)
* Add a timer-driven task

* Spawn another timer

* Log

* foo

* Do not access current time on each schedule

* Update generic queue

* Minimize alarm priorities

* Point to github with patches

* Fix build without any queue impl selected

* Remove explicit generic-queue features

* Define cfgs, fix calling something uninitialized

* Clean up RefCell+generic queue

* Fix arg order

* Feature

* Fix single integrated-timer queue

* Fix next expiration when arming

* Add note

* Adjust impl to latest changes

* Local patch

* Refactor the refactor refactor

* Track the timer item's owner

* Clear owner on dequeue

* Clean up

* Point at the right branch

* Fix panic message

* Hide private function

* Remove integrated-timer references

* Point at upstream embassy

* Configure via esp-config

* Document, clean up, fix

* Hack

* Remove patches

* Update config separator, test the complex variant

* Undo esp-config hack

* Remove trouble example, update edge-net

* Update test deps

* Document

* Update bt-hci.

* Fix generic queue

* Fix panic message

* Fix UB

* Fix rebase

* Resolve UB

* Avoid mutable reference in interrupt executor

---------

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2025-01-14 16:17:58 +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
Dániel Buga
f07e25c970
Add option to disable waiti (#2329) 2024-10-30 08:12:15 +00:00
Björn Quentin
a5be31fadc
Improve and use timer abstractions (#1753)
* Make esp-wifi timer agnostic

* Use timer-abstractions in embassy time driver

* Refactor

* Fix

* Fix

* Docs

* Adapt examples

* Adapt tests

* Refactoring

* Changelogs

* Fix example

* Adapt xtask

* Make CI pass

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-07-09 15:59:38 +00:00
Jesse Braham
48e3e912f3
Extract embassy support into esp-hal-embassy package (#1595)
* Extract embassy support into `esp-hal-embassy` package

* Update relevant packages/examples/tests to get CI green again

* Add back `defmt` support

* Re-export `Executor` and `InterruptExecutor` rather than making `executor` module public

* Document the `esp-hal-embassy` package

* Update `CHANGELOG.md`

* Hack together a "fix" for the `SYSTIMER` time driver

* Make `clippy` shut up
2024-06-03 11:27:20 +00:00