Commit Graph

85 Commits

Author SHA1 Message Date
Dániel Buga
61cdde5a6c
Document, clean up, fix 2025-01-09 18:59:56 +01:00
Dániel Buga
a572e631df
Configure via esp-config 2025-01-09 18:59:56 +01:00
Dániel Buga
b92d6fcecf
Point at upstream embassy 2025-01-09 18:58:09 +01:00
Dániel Buga
cff517de95
Remove integrated-timer references 2025-01-09 18:58:09 +01:00
Dániel Buga
5a246887a4
Hide private function 2025-01-09 18:56:40 +01:00
Dániel Buga
d0c611b415
Fix panic message 2025-01-09 18:56:40 +01:00
Dániel Buga
5cd996c9a1
Point at the right branch 2025-01-09 18:56:40 +01:00
Dániel Buga
c62f70d2c3
Clean up 2025-01-09 18:56:40 +01:00
Dániel Buga
7ecbe7366a
Clear owner on dequeue 2025-01-09 18:56:40 +01:00
Dániel Buga
6c12a967b0
Track the timer item's owner 2025-01-09 18:56:40 +01:00
Dániel Buga
5a3bf93b8a
Refactor the refactor refactor 2025-01-09 18:56:39 +01:00
Dániel Buga
4450f67565
Adjust impl to latest changes 2025-01-09 18:56:39 +01:00
Dániel Buga
8b6b1b9559
Add note 2025-01-09 18:56:39 +01:00
Dániel Buga
0a12fc4d26
Fix next expiration when arming 2025-01-09 18:56:39 +01:00
Dániel Buga
febd4b22b2
Fix single integrated-timer queue 2025-01-09 18:56:39 +01:00
Dániel Buga
b93553b40a
Feature 2025-01-09 18:56:39 +01:00
Dániel Buga
1a02500008
Fix arg order 2025-01-09 18:56:39 +01:00
Dániel Buga
9ea993d20d
Clean up RefCell+generic queue 2025-01-09 18:56:39 +01:00
Dániel Buga
baa087bae0
Define cfgs, fix calling something uninitialized 2025-01-09 18:56:39 +01:00
Dániel Buga
5b42d5271d
Remove explicit generic-queue features 2025-01-09 18:56:38 +01:00
Dániel Buga
d22660b2f3
Fix build without any queue impl selected 2025-01-09 18:53:48 +01:00
Dániel Buga
7c64ff0b87
Point to github with patches 2025-01-09 18:53:48 +01:00
Dániel Buga
a582772016
Minimize alarm priorities 2025-01-09 18:52:57 +01:00
Dániel Buga
83056ee6b0
Update generic queue 2025-01-09 18:52:33 +01:00
Dániel Buga
381db5a858
Do not access current time on each schedule 2025-01-09 18:52:33 +01:00
Dániel Buga
790c5d5db3
foo 2025-01-09 18:52:33 +01:00
Dániel Buga
fff6bcb917
Add a timer-driven task 2025-01-09 18:51:35 +01:00
Dániel Buga
05303d1e37
Fix thread-mode executor on core1 not waking up 2025-01-09 18:48:48 +01:00
Dániel Buga
0ef00206d5
Remove all instance type params (#2907) 2025-01-09 11:27:48 +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
Dániel Buga
19eb7728bb
Allow clippy to break API, ignore a few initialism errors (#2840) 2025-01-03 14:13:07 +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
bc0bedd628
Add priority-limited locks (#2684)
* Add priority-limited locks

* Rename to RawMutex, only provide lock() publicly

* Explode implementation and move into the interrupt module
2024-12-16 08:39:42 +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
Scott Mabin
2512658653
[3/3] Timer refactor: Timer driver mode, ETM support and erasure (#2586)
* Add mode param and type erasure to high level timer drivers

* Add async impls for the timers plus eha impl

* re add etm example, fix etm for systimer

* re add tests

* Add Into<AnyTimer> + 'static bounds to the Timer trait

* remove set_alarm_active impl detail from the timer trait

* clippy

* doc fix ups

* changelog and migration guide

* review

* fix h2, reuse schedule for delay
2024-11-27 14:10:56 +00:00
Dániel Buga
aed0fac0eb
Rewrite time driver (#2559)
* Rewrite time driver

* Don't store priority

* Changelog

* Fix doc example

* Use separate locks for Alarms

* Mention generic queues

* Cache the next wakeup timestamp

* Immediately repoll if timestamp is in the past

* Add benchmark

* Remove equality check for now

* Enable interrupts when allocating the alarm

* Clean up

* Use relaxed ordering

* wut

* Typo

* Move benchmar

* fmt
2024-11-25 17:02:47 +00:00
Scott Mabin
79ca9d07aa
[2/3] Timer refactor: TIMG (#2581)
* system timer simplfication

* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
  pattern is instead intended to be used on the higher level timer
  drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
  modify the `Unit`'s safely whilst timers and or the `time::now` API is
  in use

* fix examples and tests (by removing them :D)

* changelog and migration

* Review feedback

* changelog and migration

* /unit_count/unit_value/g

* changelog and migration

* /unit_count/unit_value/g

* system timer simplfication

* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
  pattern is instead intended to be used on the higher level timer
  drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
  modify the `Unit`'s safely whilst timers and or the `time::now` API is
  in use

* Make TimerGroup Timer's dumb and untyped

* changelog

* review

* review
2024-11-22 16:14:14 +00:00
Scott Mabin
60a2c76005
[1/4] Timer refactor: system timer (#2576)
* system timer simplfication

* Removes _all_ type params on Alarm
* Systimer no longer implements peripheral ref, the peripheral ref
  pattern is instead intended to be used on the higher level timer
  drivers
* Removed `Unit` as a type, in favour of an enum
* Alarms are back in the main `SystemTimer` "driver"
* Made all `Unit` modification methods unsafe, it's not possible to
  modify the `Unit`'s safely whilst timers and or the `time::now` API is
  in use

* fix examples and tests (by removing them :D)

* changelog and migration

* /unit_count/unit_value/g

* etm doctest

* Review feedback
2024-11-22 11:24:06 +00:00
Jesse Braham
02ddad47c0
Add new migration guides (#2571) 2024-11-21 09:05:33 +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
Dániel Buga
432622ca9f
Clarify embassy migration guide (#2565) 2024-11-19 13:31:43 +00:00
Dániel Buga
26fd1a40d9
Avoid polling for no reason (#2551) 2024-11-19 07:58:02 +00:00
Jesse Braham
c19c7fcf01
Remove get_core() in favour of Cpu::current() (#2533)
* Remove `esp_hal::core()` in favour of `Cpu::current()`

* Update migration guide

* Update `CHANGELOG.md`
2024-11-13 16:13:47 +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
Dániel Buga
1e6820d1a7
Systimer improvements (#2451)
* Do not read to set update bit

* Deduplicate

* Try to bind interrupts to the correct core

* Inline poll_count into read_count

* Clean up

* Make sure only a single update is done at a time

* Changelog

* Fix docs

* Correct the channel count

* Assign enough timers for HIL test

* Use a lock to prevent re-update

* Remove locking, use esp-idf implementation

* Document timer count requirement
2024-11-04 11:36:34 +00:00
Dániel Buga
f07e25c970
Add option to disable waiti (#2329) 2024-10-30 08:12:15 +00:00
Dániel Buga
f3c5286028
Add Cpu::COUNT and clean up in esp-hal-embassy (#2411)
* Add Cpu::COUNT and simplify

* Avoid a bounds check during pending
2024-10-26 13:36:10 +00:00