Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
cm-projects
RIOT
Commits
aee4771a
Unverified
Commit
aee4771a
authored
6 years ago
by
Alexandre Abadie
Browse files
Options
Downloads
Patches
Plain Diff
tests/periph_rtt: use a 5s delay between each hello
parent
fd2ffd9e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/periph_rtt/README.md
+1
-1
1 addition, 1 deletion
tests/periph_rtt/README.md
tests/periph_rtt/main.c
+4
-4
4 additions, 4 deletions
tests/periph_rtt/main.c
with
5 additions
and
5 deletions
tests/periph_rtt/README.md
+
1
−
1
View file @
aee4771a
Expected result
===============
When everything works as expected, you should see a hello message popping up every
10
seconds.
When everything works as expected, you should see a hello message popping up every
5
seconds.
Background
==========
...
...
This diff is collapsed.
Click to expand it.
tests/periph_rtt/main.c
+
4
−
4
View file @
aee4771a
...
...
@@ -14,7 +14,7 @@
* @brief Test for low-level Real Time Timer drivers
*
* This test will initialize the real-time timer and trigger an alarm printing
* 'Hello' every
10
seconds
* 'Hello' every
5
seconds
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
...
...
@@ -29,7 +29,7 @@
#include
"periph_conf.h"
#include
"periph/rtt.h"
#define TICKS_TO_WAIT (
10
* RTT_FREQUENCY)
#define TICKS_TO_WAIT (
5
* RTT_FREQUENCY)
static
volatile
uint32_t
last
;
...
...
@@ -47,7 +47,7 @@ void cb(void *arg)
int
main
(
void
)
{
puts
(
"
\n
RIOT RTT low-level driver test"
);
puts
(
"This test will display 'Hello' every
10
seconds
\n
"
);
puts
(
"This test will display 'Hello' every
5
seconds
\n
"
);
puts
(
"Initializing the RTT driver"
);
rtt_init
();
...
...
@@ -56,7 +56,7 @@ int main(void)
printf
(
"RTT now: %"
PRIu32
"
\n
"
,
now
);
last
=
(
now
+
TICKS_TO_WAIT
)
&
RTT_MAX_VALUE
;
printf
(
"Setting initial alarm to now +
10
s (%"
PRIu32
")
\n
"
,
last
);
printf
(
"Setting initial alarm to now +
5
s (%"
PRIu32
")
\n
"
,
last
);
rtt_set_alarm
(
last
,
cb
,
0
);
puts
(
"Done setting up the RTT, wait for many Hellos"
);
...
...
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