Commit graph

70 commits

Author SHA1 Message Date
Per Lindgren
5688a5d332 executor update for less unsafe and more clear 2023-03-01 00:33:30 +01:00
Emil Fresk
d6d58b0eb8 Async tasks can now take arguments at spawn again 2023-03-01 00:33:30 +01:00
Emil Fresk
cd790a9428 More work on new spawn/executor 2023-03-01 00:33:29 +01:00
Emil Fresk
6d252785e8 Support 0 prio tasks 2023-03-01 00:33:28 +01:00
Emil Fresk
9a67f00a30 Fix typos 2023-03-01 00:33:28 +01:00
Emil Fresk
714020a624 Removed Priority, simplified lifetime handling 2023-03-01 00:31:06 +01:00
Emil Fresk
3b97531a5c First example builds again 2023-03-01 00:31:05 +01:00
Emil Fresk
5c3cedf69a Fix fences 2023-03-01 00:31:05 +01:00
Emil Fresk
f8352122a3 Min codegen 2023-03-01 00:31:04 +01:00
Emil Fresk
7614b96fe4 RTIC v2: Initial commit
rtic-syntax is now part of RTIC repository
2023-03-01 00:29:10 +01:00
Henrik Tjäder
800904a105 Handle more cfgs, support cfg on HW/SW tasks 2023-01-22 13:38:43 +01:00
Henrik Tjäder
be74469ab7 Enable at least masking out a Monotonic
Simplest case working, but leaves a lot to ask
as shown by examples/cfg-monotonic.rs

Current `rtic-syntax` is unable to validate and
handle the `cfgs[]` which limits the usefulness
of this.
2023-01-22 12:00:08 +01:00
Henrik Tjäder
f6b0d18e24 Improve RTIC doc handling
Enable use of

```
 #![deny(missing_docs)]
```
2023-01-22 00:26:23 +01:00
Henrik Tjäder
5ed93bd1bf Clippy with pedantic suggestions 2022-02-22 18:56:21 +01:00
Henrik Tjäder
099544f655 Fix/mute clippy errors 2022-02-09 18:58:50 +01:00
Emil Fresk
0dcb0c4e49 New monotonic trait working 2021-11-09 10:20:43 +01:00
Emil Fresk
8065d741ac Fixed aliasing issue due to RacyCell implementation 2021-11-02 13:41:12 +01:00
Emil Fresk
7c6588e6bd Fix export of SYST 2021-09-28 10:38:22 +02:00
Emil Fresk
b71df58f2f The great docs update 2021-09-23 16:11:04 +02:00
Emil Fresk
addb086070 Cleanup export and actually use rtic::export, made fn init inline 2021-09-14 16:13:28 +02:00
bors[bot]
22ec841ee1
Merge #516
516: More rustanalyzer lint fixes r=korken89 a=korken89

Found some more

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2021-08-20 07:27:07 +00:00
Emil Fresk
52dc324aa7 More rustanalyzer lint fixes 2021-08-20 09:21:02 +02:00
datdenkikniet
cdbd8a2ced Use mark_internal_name by default for methods in util to make usage of these functions more straightforward.
fq_ident is always internal

rq_ident is always internal

monotonic_ident is always internal

inputs_ident is always internal

local_resources_ident is always internal

shared_resources_ident is always internal

monotonic_instants_ident is always internal

tq_ident is always internal

timer_queue_marker_ident is always internal

static_shared_resource_ident is always internal

static_local_resource_ident is always internal

declared_static_local_resource_ident is always internal

Only names, not idents, are now marked as internal

Use same rtic internal everywhere
2021-08-20 08:12:13 +02:00
Emil Fresk
13f7516a4d Fixed some lints from Rust Analyzer with experimental proc-macros 2021-08-19 09:49:00 +02:00
Emil Fresk
bc3eb5c547 Remove linked list impl - use heapless, linked list init now const fn 2021-08-16 15:38:31 +02:00
Alex Crawford
5f395658f0 Propogate the task attributes to the spawn handles
This allows tasks to be gated by `cfg` attributes when also using
monotonics. For example:

```rust
#[cfg(feature = "logging")]
#[task(shared = [logger])]
fn logger_init(mut cx: logger_init::Context) {
    /* ... */
}
```

Without this change, the reschedule_at() implementation is
unconditionally included even though it references the SpawnHandle from
its task module, which is _conditionally_ included. This resulted in
compiler errors like the following:

```
error[E0433]: failed to resolve: use of undeclared crate or module `logger_init`
   --> src/main.rs:243:8
    |
243 |     fn logger_init(mut cx: logger_init::Context) {
    |        ^^^^^^^^^^^ use of undeclared crate or module `logger_init`
```
2021-07-22 01:00:57 -07:00
Emil Fresk
8f37043782 Cleanup from review (needs releases to compile) 2021-07-08 23:18:44 +02:00
Emil Fresk
d7393c5b27 Full local resource syntax working 2021-07-07 21:04:31 +02:00
Emil Fresk
ef5307d83a Minimal app now compiles 2021-07-06 22:47:48 +02:00
Emil Fresk
c17348d290 Prepare release alpha.4 2021-05-27 18:10:24 +02:00
Emil Fresk
b4509bdbfe Flattened the _ out of it 2021-05-06 19:40:37 +02:00
Emil Fresk
50f26e78ed Keep comments 2021-04-22 18:38:42 +02:00
Emil Fresk
6aa0fb450f Goodbye static mut 2021-04-08 19:58:20 +02:00
Emil Fresk
51500a1d70 Fixed UB in spawn_at 2021-04-08 10:14:14 +02:00
Emil Fresk
2068eae928 Type aliases now work in the app module 2021-04-08 09:15:38 +02:00
Emil Fresk
3adda3c766 Updated schedule example with all combinations 2021-03-22 08:24:18 +01:00
Emil Fresk
53c407017f Cancel and reschedule working
Support cfgs in the imports

Account for extern tasks
2021-03-20 08:19:56 +01:00
Emil Fresk
1087f2ee64 Added interface for cancel/reschedule
Use wrapping add for marker

No need to store handle to queue

Remove unnecessary `SpawnHandle::new`

Fix test

Updated interface to follow proposal
2021-03-13 10:50:56 +01:00
Emil Fresk
08a37d6d3d Updated spawn_after docs 2021-03-02 19:31:47 +01:00
Emil Fresk
d351f55e1c Documentation generation fixes
Test fixes
2021-02-25 19:16:28 +01:00
Emil Fresk
767d46e05b Review fixes 2021-02-25 17:32:12 +01:00
Emil Fresk
cd3484cbab GHA update
Fmt fixes

Spawn_after did not work with parameters

Examples working again

Revert "GHA update"

This reverts commit e0a71d4859966a6c5cf2629d3cb27e88acada9c0.

Readd flags

Only add DWT based dep with __v7 flag
2021-02-23 21:03:51 +01:00
Emil Fresk
26870ae12e Use zero time in init for spawn_after to not cause panic 2021-02-22 21:47:59 +01:00
Emil Fresk
82d051e8e9 Added enable/disable timer calls 2021-02-22 20:59:03 +01:00
Emil Fresk
ebf2f058a4 Now with new monotonic trait and crate 2021-02-18 19:30:59 +01:00
Emil Fresk
6fb43fa97b Minor fixes 2021-02-04 20:22:02 +01:00
Emil Fresk
aaa92ea2fa Cleanup 2020-12-13 17:48:11 +01:00
Emil Fresk
6277183906 Now handling SysTick as well 2020-12-13 14:52:16 +01:00
Emil Fresk
35b4ec0d04 Reexport embedded-time as rtic::time 2020-12-13 00:06:50 +01:00
Emil Fresk
8e8ec9b7b8 Monotonic codegen now passing compile stage 2020-12-12 23:24:54 +01:00