Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
e7020e_2021
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Jonas Jacobsson
e7020e_2021
Commits
cddc31ff
Commit
cddc31ff
authored
4 years ago
by
Jonas Jacobsson
Browse files
Options
Downloads
Patches
Plain Diff
changed main
parent
f8f7e424
No related branches found
No related tags found
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+13
-0
13 additions, 0 deletions
src/main.rs
with
13 additions
and
0 deletions
src/main.rs
+
13
−
0
View file @
cddc31ff
...
...
@@ -26,8 +26,11 @@ const APP: () = {
struct
Resources
{
// late resources
GPIOA
:
stm32
::
GPIOA
,
<<<<<<<
HEAD
GPIOC
:
stm32
::
GPIOC
,
//button: <stm32::GPIOC as int>::PC13,
=======
>>>>>>>
9
be3604
(
changed
main
)
}
#[init(schedule
=
[
toggle]
)]
...
...
@@ -61,6 +64,7 @@ const APP: () = {
// configure PA5 as output, RM0368 8.4.1
device
.GPIOA.moder
.modify
(|
_
,
w
|
w
.moder5
()
.bits
(
1
));
<<<<<<<
HEAD
// Test button thingy. Think I put PC13 to input
device
.GPIOC.moder
.modify
(|
_
,
w
|
w
.moder13
()
.bits
(
0
));
// device.GPIOC.pupdr.modify(|_, w| w.pupdr13().bits(0));
...
...
@@ -70,6 +74,11 @@ const APP: () = {
GPIOA
:
device
.GPIOA
,
GPIOC
:
device
.GPIOC
,
//button: device.button,
=======
// pass on late resources
init
::
LateResources
{
GPIOA
:
device
.GPIOA
,
>>>>>>>
9
be3604
(
changed
main
)
}
}
...
...
@@ -84,7 +93,11 @@ const APP: () = {
<<<<<<<
HEAD
#[task(resources
=
[
GPIOA,GPIOC]
,
schedule
=
[
toggle
])]
=======
#[task(resources
=
[
GPIOA]
,
schedule
=
[
toggle
])]
>>>>>>>
9
be3604
(
changed
main
)
fn
toggle
(
cx
:
toggle
::
Context
)
{
static
mut
TOGGLE
:
bool
=
false
;
rprintln!
(
"toggle @ {:?}"
,
Instant
::
now
());
...
...
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