Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
stm32f423-rtfm-aes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Lindgren
stm32f423-rtfm-aes
Commits
271df39b
Commit
271df39b
authored
7 years ago
by
Jorge Aparicio
Browse files
Options
Downloads
Patches
Plain Diff
`Send`-ness check is now in rtfm-core
parent
b9f50e43
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
macros/src/trans.rs
+0
-20
0 additions, 20 deletions
macros/src/trans.rs
tests/cfail/interrupt.rs
+5
-1
5 additions, 1 deletion
tests/cfail/interrupt.rs
tests/cfail/token-transfer.rs
+5
-2
5 additions, 2 deletions
tests/cfail/token-transfer.rs
with
10 additions
and
23 deletions
macros/src/trans.rs
+
0
−
20
View file @
271df39b
...
...
@@ -12,7 +12,6 @@ pub fn app(app: &App, ownerships: &Ownerships) -> Tokens {
let
mut
root
=
vec!
[];
let
mut
main
=
vec!
[];
::
trans
::
check
(
app
,
&
mut
main
);
::
trans
::
init
(
app
,
&
mut
main
,
&
mut
root
);
::
trans
::
idle
(
app
,
ownerships
,
&
mut
main
,
&
mut
root
);
::
trans
::
resources
(
app
,
ownerships
,
&
mut
root
);
...
...
@@ -28,25 +27,6 @@ pub fn app(app: &App, ownerships: &Ownerships) -> Tokens {
quote!
(
#
(
#
root
)
*
)
}
// Checks that the resource types are valid
// Sadly we can't do this test at expansion time. Instead we'll generate some
// code that won't compile if the types don't meet the requirements
fn
check
(
app
:
&
App
,
main
:
&
mut
Vec
<
Tokens
>
)
{
if
!
app
.resources
.is_empty
()
{
main
.push
(
quote!
{
fn
is_send
<
T
>
()
where
T
:
Send
{}
});
}
for
resource
in
app
.resources
.values
()
{
let
ty
=
&
resource
.ty
;
main
.push
(
quote!
{
is_send
::
<
#
ty
>
();
});
}
}
fn
idle
(
app
:
&
App
,
ownerships
:
&
Ownerships
,
...
...
This diff is collapsed.
Click to expand it.
tests/cfail/interrupt.rs
+
5
−
1
View file @
271df39b
...
...
@@ -14,7 +14,9 @@ app! {
tasks
:
{
// ERROR this interrupt doesn't exist
EXTI33
:
{},
EXTI33
:
{
path
:
exti33
,
},
},
}
...
...
@@ -23,3 +25,5 @@ fn init(_p: init::Peripherals) {}
fn
idle
()
->
!
{
loop
{}
}
fn
exti33
()
{}
This diff is collapsed.
Click to expand it.
tests/cfail/token-transfer.rs
+
5
−
2
View file @
271df39b
...
...
@@ -15,10 +15,13 @@ app! { //~ error bound `rtfm::Threshold: core::marker::Send` is not satisfied
static
TOKEN
:
Option
<
Threshold
>
=
None
;
},
idle
:
{
resources
:
[
TOKEN
],
},
tasks
:
{
EXTI0
:
{
path
:
exti0
,
priority
:
1
,
resources
:
[
TOKEN
],
},
}
...
...
@@ -26,7 +29,7 @@ app! { //~ error bound `rtfm::Threshold: core::marker::Send` is not satisfied
fn
init
(
_p
:
init
::
Peripherals
,
_r
:
init
::
Resources
)
{}
fn
idle
()
->
!
{
fn
idle
(
_t
:
&
mut
Threshold
,
_r
:
idle
::
Resources
)
->
!
{
loop
{}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment