diff options
author | 2020-12-13 14:52:16 +0100 | |
---|---|---|
committer | 2020-12-13 14:52:16 +0100 | |
commit | 62771839061aaa7dd518d40969bee609d7d2bda8 (patch) | |
tree | e1fec18f0cd9fe519961c8b72ea41e72ddfc294d /macros/src/codegen/util.rs | |
parent | 0e134a41b5f53843b5e1c90cd0633ae56b7a3113 (diff) | |
download | rtic-62771839061aaa7dd518d40969bee609d7d2bda8.tar.gz rtic-62771839061aaa7dd518d40969bee609d7d2bda8.tar.zst rtic-62771839061aaa7dd518d40969bee609d7d2bda8.zip |
Now handling SysTick as well
Diffstat (limited to 'macros/src/codegen/util.rs')
-rw-r--r-- | macros/src/codegen/util.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index a201dfe5..287ba408 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -217,7 +217,7 @@ pub fn rq_ident(priority: u8) -> Ident { /// Generates an identifier for the `enum` of `schedule`-able tasks pub fn schedule_t_ident() -> Ident { - Ident::new(&"SCHED_T".to_string(), Span::call_site()) + Ident::new(&"SCHED_T", Span::call_site()) } /// Generates an identifier for the `enum` of `spawn`-able tasks @@ -228,6 +228,7 @@ pub fn spawn_t_ident(priority: u8) -> Ident { Ident::new(&format!("P{}_T", priority), Span::call_site()) } +/// Suffixed identifier pub fn suffixed(name: &str) -> Ident { let span = Span::call_site(); Ident::new(name, span) @@ -237,3 +238,11 @@ pub fn suffixed(name: &str) -> Ident { pub fn tq_ident(name: &str) -> Ident { Ident::new(&format!("TQ_{}", name), Span::call_site()) } + +/// The name to get better RT flag errors +pub fn rt_err_ident() -> Ident { + Ident::new( + &"you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml", + Span::call_site(), + ) +} |