Commit graph

21 commits

Author SHA1 Message Date
Jorge Aparicio
72f0cc505a make cfail test actually fail 2019-02-26 23:22:34 +01:00
Jorge Aparicio
7ce052be37 cargo fmt 2019-02-16 00:26:07 +01:00
Jorge Aparicio
88599780e0 accept init: fn() -> init::LateResources 2019-02-12 14:53:49 +01:00
Jorge Aparicio
557a51ede1 forbid early returns in init 2019-02-12 11:07:15 +01:00
Jorge Aparicio
56d09a12dd move macros crate to the 2018 edition 2018-12-16 19:14:58 +01:00
Jorge Aparicio
8e9a91d0b0 properly handle #[cfg] (conditional compilation) on tasks 2018-12-16 19:10:36 +01:00
Jorge Aparicio
c631049efc v0.4.0
closes #32
closes #33
2018-11-03 17:16:55 +01:00
Ferdia McKeogh
14b1811182 Fix "Could not find Op in proc_macro" 2018-06-07 11:45:11 +01:00
Jorge Aparicio
7fdf16eab9 update parser
closes #69

this doesn't change functionality per se but improves diagnostics in some cases. Some hard errors
have becomes warnings, for example: when `resources` is empty, or when `idle.path` is set to the
default `idle` path.
2018-04-16 21:32:29 +02:00
Jorge Aparicio
d30bdcb096 safe &'static mut references via init.resources 2017-12-09 17:17:56 +01:00
Jorge Aparicio
e97afa71ce peripherals as scoped singletons 2017-12-09 12:45:57 +01:00
Jorge Aparicio
2d80f3631b update examples 2017-07-29 00:46:38 -05:00
Jorge Aparicio
b9f50e432e make task.$T.path mandatory 2017-07-27 19:39:18 -05:00
Jorge Aparicio
d396da5950 make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate
to the procedural macro logic
2017-07-27 17:08:42 -05:00
Jorge Aparicio
b37c45ad2a make task.$T.priority optional
default the value to 1 if omitted
2017-07-27 12:11:22 -05:00
Jorge Aparicio
fb4542818b task! is not needed if tasks.$T.path is specified 2017-07-24 22:46:29 -05:00
Jorge Aparicio
5824f837e1 adapt to changes in rtfm-syntax 2017-07-18 16:49:59 -05:00
Jorge Aparicio
e9788ff9b6 rename rtfm! to app! and adapt to changes in rtfm-syntax 2017-07-14 20:47:06 -05:00
Jorge Aparicio
98596554b3 split macro parser into its own crate and improve error handling / reporting 2017-07-14 18:57:02 -05:00
Jorge Aparicio
3cebf49a2f syntax tweaks, relax check, add set_pending(), deal with imported types
- allow trailing commas in list of resources

- make task.resources optional

- add rtfm::set_pending function which can be used to force an interrupt into
  the pending state. This is a replacement of the old rtfm::request.
  rtfm::set_pending takes the Interrupt enum provided by the device crate as
  argument. (The old rtfm::request took a task function as argument)

- the user may want to use types they imported into the root of the crate. These
  types are not available in e.g. `mod idle` so `idle::Resources` *can't* be
  defined in that module. To workaround this problem `idle::Resources` will be
  defined in the root, with some other name, and then be re-exported in the
  `idle` module.

- remove the "a resource only used by one task should be local data" check. In
  some cases you do want a resource owned by a single task instead of local
  data since `init` can access resources but not a task local data.
2017-07-06 23:25:29 -05:00
Jorge Aparicio
86a360a396 rtfm! macro take 2 2017-07-04 11:26:11 -05:00