Commit graph

60 commits

Author SHA1 Message Date
Per Lindgren
9f80c9b916 now with the very exclusive feature link_fail 2020-06-15 23:31:30 +02:00
Per Lindgren
afdf957e99 Exclusive examples 2020-06-15 22:29:50 +02:00
Per Lindgren
2d4a960c8b first attemtp to support Exclusive 2020-06-15 18:56:10 +02:00
Per Lindgren
245f4f9b6e wip4, benchmark 2020-06-13 02:02:42 +02:00
Per Lindgren
7c504668da wip3, examples lock3 and lock4 now express intended use, relation to Exclusive still not resolved 2020-06-13 01:21:22 +02:00
Per Lindgren
c360ffaad8 wip2 2020-06-13 00:19:01 +02:00
Per Lindgren
3c208003f5 wip1 2020-06-12 22:39:20 +02:00
Henrik Tjäder
602a5b4374 Rename RTFM to RTIC 2020-06-11 17:18:29 +00:00
Emil Fresk
eb6406da7e Fmt 2020-06-11 19:00:52 +02:00
Emil Fresk
ac0e687431
Merge pull request #313 from russell/patch-1
Update example to use better initial value
2020-06-11 18:45:51 +02:00
bors[bot]
4795c1dba3
Merge #315
315: allow handlers to be named 'main' r=korken89 a=japaric

`#[init]`, `#[idle]` and `#[task]` handlers can now be named `main`

fixes #311

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2020-06-11 16:22:33 +00:00
Henrik Tjäder
5f61f7b75f Use cargo feature instead of conditional compilation hacks 2020-06-10 13:31:48 +00:00
Henrik Tjäder
137283959c Run cargo fmt 2020-06-03 10:34:01 +00:00
Jorge Aparicio
0ad311074e allow handlers to be named 'main'
`#[init]`, `#[idle]` and `#[task]` handlers can now be named `main`

fixes #311
2020-05-29 14:50:28 +02:00
Russell Sim
7266ffe3a6
Update example to use better initial value
The example above this in the documentation states

```
        // semantically, the monotonic timer is frozen at time "zero" during `init`
        // NOTE do *not* call `Instant::now` in this context; it will return a nonsense value
        let now = cx.start; // the start time of the system
```

It results in weird scheduling issues, but still eventually works.  `cx.start` is much more reliable.

Relates to https://github.com/rtfm-rs/cortex-m-rtfm/issues/196
2020-05-26 07:33:18 +02:00
Henrik Tjäder
f58f37b2b9 Retain cfg-attributes on resources 2020-04-22 09:26:13 +00:00
bors[bot]
60c14ef680
Merge #294
294: use the safe DWT::unlock API r=korken89 a=japaric

instead of a unsafe write_volatile call

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2020-01-24 15:45:14 +00:00
Jorge Aparicio
b04103f6df docs: do not use Instant::now in #[init] 2020-01-21 22:23:20 +01:00
Jorge Aparicio
60639b3a9c use the safe DWT::unlock API
instead of a unsafe write_volatile call
2020-01-21 22:13:23 +01:00
Emil Fresk
76e234599f Added struct de-structure-ing example in tips & tricks 2019-11-07 14:12:16 +01:00
Jorge Aparicio
eef4e7bf79 more monotonic timer docs
covers

- initialization and configuration of the timer; this is now a responsibility of
  the application author
- correctness of `Monotonic::now()` in `#[init]`
- safety of `Monotonic::reset()`

closes #251
2019-10-15 18:44:49 -05:00
Jorge Aparicio
7ca5bbf404 fix preempt example 2019-08-21 10:53:13 +02:00
Jorge Aparicio
07b2b4d830 doc up 2019-08-21 10:17:27 +02:00
Jorge Aparicio
9195038c87 implement RFC #212 2019-07-10 22:42:44 +02:00
Jorge Aparicio
4e51bb68b9 RFC #207 2019-06-20 06:19:59 +02:00
Jorge Aparicio
81275bfa4f rtfm-syntax refactor + heterogeneous multi-core support 2019-06-13 23:56:59 +02:00
Jorge Aparicio
ccd7f4586b book: indirection for faster message passing 2019-05-01 21:32:00 +02:00
Jorge Aparicio
1b4b006bab update examples 2019-05-01 20:49:25 +02:00
Jorge Aparicio
e865cbb2e5 book: resources shared with init must also be Send 2019-04-21 18:00:22 +02:00
Jorge Aparicio
11f795aaf6 add binds example and make it work 2019-02-26 23:22:34 +01:00
Jorge Aparicio
89c922079e update examples and tests 2019-02-12 15:08:46 +01:00
Jorge Aparicio
34e74f4bb3 book: add an example of conditional compilation of resources and tasks 2018-12-16 20:57:04 +01:00
Jorge Aparicio
a279218295 use new cortex_m_semihosting::hprintln macro 2018-11-04 19:57:39 +01:00
Jorge Aparicio
37a0692a0f impl Mutex on all shared resources
document how to write generic code that operates on resources
2018-11-04 18:50:42 +01:00
Jorge Aparicio
c631049efc v0.4.0
closes #32
closes #33
2018-11-03 17:16:55 +01:00
Jorge Aparicio
abca829926 more fixes 2018-08-24 16:31:04 +02:00
Jorge Aparicio
efca108103 cargo fmt 2018-04-16 21:32:52 +02:00
Jorge Aparicio
def4fc8079 v0.3.0 2018-01-15 23:33:09 +01:00
Jorge Aparicio
1be43fc489 adapt to changes in the cortex-m crate 2018-01-11 20:56:45 +01:00
Jorge Aparicio
d30bdcb096 safe &'static mut references via init.resources 2017-12-09 17:17:56 +01:00
Jorge Aparicio
a6dd004113 implement the Resource trait for owned resources
this unbreaks the "generics" example
2017-12-09 17:17:56 +01:00
Jorge Aparicio
219e172680 drop the Static wrapper 2017-12-09 17:15:15 +01:00
Jorge Aparicio
8f23fdc934 deny warnings and unsafe code in tests and examples 2017-12-09 15:12:42 +01:00
Jorge Aparicio
512091e8a3 fix the "generics" example 2017-12-09 14:45:59 +01:00
Jorge Aparicio
79e2b7dc2e rename LateResourceValues to LateResources 2017-12-09 13:20:41 +01:00
Jorge Aparicio
e97afa71ce peripherals as scoped singletons 2017-12-09 12:45:57 +01:00
Jorge Aparicio
948e1fd0fb v0.2.2 2017-11-22 09:29:01 +01:00
Jorge Aparicio
c184f91e3c fix the example 2017-10-02 15:11:37 +02:00
Jorge Aparicio
2415a640af fix idle::Resources::new
it assumed that all resources were "early" resources
2017-10-02 14:49:40 +02:00
Jonas Schievink
1556948458 Fix shared resource handling and extend example.
The extended example tests that this actually works this time.
2017-09-22 18:19:18 +02:00