Commit graph

27 commits

Author SHA1 Message Date
dalegaard
a636f4e4ad
Change timeout/delay functions to non-async (#910)
Because of a compiler bug, the `async` implementations of
`delay`/`delay_until`/`timeout`/`timeout_at` produce much larger RAM
footprint than they should.

Fixes #890.

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2024-08-21 18:40:52 +00:00
Emil Fresk
2efdef6029 Fix clippy lints 2024-05-27 11:26:06 +02:00
Hiroaki Yutani
e6dff2c047
Fix another clippy::assign_op_pattern warning (#933) 2024-05-08 18:22:16 +00:00
Hiroaki Yutani
7fd9e6476b
Fix clippy::assign_op_pattern lint (#932) 2024-05-03 06:55:41 +00:00
Finomnis
8c23e178f3
Monotonic rewrite (#874)
* Rework timer_queue and monotonic architecture

Goals:
 * make Monotonic purely internal
 * make Monotonic purely tick passed, no fugit involved
 * create a wrapper struct in the user's code via a macro that then
   converts the "now" from the tick based monotonic to a fugit based
   timestamp

We need to proxy the delay functions of the timer queue anyway,
so we could simply perform the conversion in those proxy functions.

* Update cargo.lock

* Update readme of rtic-time

* CI: ESP32: Redact esp_image: Too volatile

* Fixup: Changelog double entry rebase mistake

---------

Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
2024-04-10 22:00:38 +00:00
Gram
fa2a5b449f
Docs: Rename DelayUs to DelayNs in docs for macros. (#908) 2024-03-24 17:15:57 +00:00
Finomnis
bbed945285
Fix race condition in calculate_now (#860)
* Fix race condition in calculate_now

* Add changelog

* Update changelog

* Refine comment

* More comment fixes
2023-12-06 18:36:09 +00:00
Finomnis
f377471e44
Fix nrf::rtc errata workaround (#858)
* Deprecate `should_dequeue_check`

* Fix errata by delaying the wakeup point

* Add changelog

* Fix changelog typos
2023-12-06 18:36:06 +00:00
Finomnis
89160b7cb9
Fix nrf monotonics (#852)
* Fix nrf::timer

* Bootstrap nrf52840-blinky example

* More work on nrf blinky example

* Fix README

* Add asserts for correct timer functionality

* Add correctness check to other monotonics as well

* Update Changelog

* Fix potential timing issues

* Fix race condition in nrf::rtc

* Add changelog

* Add rtc blinky example

* Change rtc example to RC lf clock source

* Add changelog to rtic-time

* Add changelog

* Attempt to fix CI

* Update teensy4-blinky Cargo.lock
2023-12-06 07:49:38 +00:00
Finomnis
c227a71d24
Refactor race condition free timer helper (#850)
* Implement half_period_counter in rtic-time

* Rename compute_now to calculate_now, use it in stm32 and imxrt

* Add more tests

* Add some docs

* Fix clippy warning, add imxrt timer to monotonics tests

* Bump dependency version to make sure monotonics will build properly

* Add changelog to rtic-monotonics

* Add more docs

* Add more docs

* Finish documentation

* Fix typos

* Switch from atomic-polyfill to portable-atomic

* Some more doc fixes

* More doc fixes

* Minor doc fix

* Minor doc fix

* Fix Atomics not existing

* Fix example

* Minor example improvement

* Revert back to atomic-polyfill

* Fix cargo.toml formatting

* Remove atomic-polyfill

* Attempt to fix unused macro warning

* Remove atomics completely from half period counter

* Minor doc fix

* Doc fixes

* Doc fixes

* Remove obsolete comment

* Fix ordering in monotonic initialization sequence
2023-12-04 14:53:02 +00:00
Finomnis
612a47ef4d
Fix mono delay (#843)
* rtic-time: Compenstate for timer uncertainty

* Update changelog and incorrect cargo.lock in an example

* Fix Monotonic impls

* Fix tests

* Fix other monotonics, again

* Update changelog

* Fix example

* Fix DelayUs and DelayMs impls

* Minor coding style fix in u64 conversions

* Fix all changelogs

* Fix changelog

* Fix blocking DelayUs

* Minor monotonic rework

* Add delay precision test

* Add more tests

* Add rust-version tags to Cargo.toml

* Fix imxrt, rp2040 and systick timer

* Fix more monotonics

* Fix systick monotonic

* Some reverts

* Fix imxrt

* Fix nrf

* Fix rp2040

* Fix stm32

* Fix systick

* Fix rtic-time tests

* Bump to e-h.rc2

* Apply e-h.rc2 fixes to rtic-time

* Apply fixes from arbiter

* Fix clippy warning

* Minor beautification

* Revert previous changes

* Fix variable name

* Add blocking tests, but disable them by default
2023-12-01 07:59:22 +00:00
Emil Fresk
3c9a8f290d Fix CI with async_fn_in_trait not being a feature 2023-11-01 19:52:57 +00:00
bors[bot]
55083fb3cc
Merge #736
736: More `xtasks` and add examples to `rtic` repo r=korken89 a=datdenkikniet

This was in #732 before, but decluttering that PR seemed sensible

Co-authored-by: datdenkikniet <jcdra1@gmail.com>
2023-04-16 19:19:09 +00:00
datdenkikniet
2db26c1015 Deny on warnings in xtasks 2023-04-16 13:08:46 +02:00
datdenkikniet
822eaabec0 rtic-time: Docs 2023-04-15 19:19:49 +02:00
Emil Fresk
66780d8a7b Fix if a enqueued instant is first in a non-empty queue 2023-04-08 22:11:12 +02:00
Emil Fresk
a2f153249f Added nRF monotonics 2023-04-02 15:19:07 +02:00
Henrik Tjäder
ebd35b89a4 rtic-time: clippy fixes 2023-03-04 20:52:55 +01:00
Emil Fresk
1cda61fbda Make some linked list operations unsafe, and document their safety at usage 2023-03-01 00:35:20 +01:00
Emil Fresk
d0c5126960 Cleanup common code and clippy fixes 2023-03-01 00:33:39 +01:00
Emil Fresk
2bd70baeb9 rtic-time: Make Send happy 2023-03-01 00:33:37 +01:00
Emil Fresk
3050fc0591 Use Pin in the linked lists 2023-03-01 00:33:36 +01:00
Henrik Tjäder
1baa4a4228 CI: Don't let warnings get away 2023-03-01 00:33:34 +01:00
Emil Fresk
51d4eccc72 Fixes in MPSC linked list and dropper handling 2023-03-01 00:33:32 +01:00
Emil Fresk
2e96229c91 Remove unnecessary MaybeUninit 2023-03-01 00:33:32 +01:00
Emil Fresk
143cd136ee Optimize linked list popping so delete is not run everytime 2023-03-01 00:33:32 +01:00
Emil Fresk
71b5f9438e Fixed systick monotonic 2023-03-01 00:33:31 +01:00