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
3a66df0c
Unverified
Commit
3a66df0c
authored
7 years ago
by
Joakim Nohlgård
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #8225 from gebart/pr/hwrng-init
periph_common: Call hwrng_init when enabled
parents
cdf4b7a5
c0fd1727
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
drivers/periph_common/init.c
+7
-0
7 additions, 0 deletions
drivers/periph_common/init.c
tests/periph_hwrng/main.c
+0
-3
0 additions, 3 deletions
tests/periph_hwrng/main.c
tests/pkg_micro-ecc-with-hwrng/main.c
+0
-3
0 additions, 3 deletions
tests/pkg_micro-ecc-with-hwrng/main.c
with
7 additions
and
6 deletions
drivers/periph_common/init.c
+
7
−
0
View file @
3a66df0c
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
#ifdef MODULE_PERIPH_RTC
#ifdef MODULE_PERIPH_RTC
#include
"periph/rtc.h"
#include
"periph/rtc.h"
#endif
#endif
#ifdef MODULE_PERIPH_HWRNG
#include
"periph/hwrng.h"
#endif
void
periph_init
(
void
)
void
periph_init
(
void
)
{
{
...
@@ -40,4 +43,8 @@ void periph_init(void)
...
@@ -40,4 +43,8 @@ void periph_init(void)
#ifdef MODULE_PERIPH_RTC
#ifdef MODULE_PERIPH_RTC
rtc_init
();
rtc_init
();
#endif
#endif
#ifdef MODULE_PERIPH_HWRNG
hwrng_init
();
#endif
}
}
This diff is collapsed.
Click to expand it.
tests/periph_hwrng/main.c
+
0
−
3
View file @
3a66df0c
...
@@ -34,9 +34,6 @@ int main(void)
...
@@ -34,9 +34,6 @@ int main(void)
printf
(
"This test will print from 1 to %u random bytes about every "
printf
(
"This test will print from 1 to %u random bytes about every "
"second
\n\n
"
,
LIMIT
);
"second
\n\n
"
,
LIMIT
);
puts
(
"Initializing the HWRNG driver.
\n
"
);
hwrng_init
();
while
(
1
)
{
while
(
1
)
{
/* zero out buffer */
/* zero out buffer */
memset
(
buf
,
0
,
sizeof
(
buf
));
memset
(
buf
,
0
,
sizeof
(
buf
));
...
...
This diff is collapsed.
Click to expand it.
tests/pkg_micro-ecc-with-hwrng/main.c
+
0
−
3
View file @
3a66df0c
...
@@ -61,9 +61,6 @@ int main(void)
...
@@ -61,9 +61,6 @@ int main(void)
printf
(
"Testing %d random private key pairs and signature using HWRNG
\n
"
,
TESTROUNDS
);
printf
(
"Testing %d random private key pairs and signature using HWRNG
\n
"
,
TESTROUNDS
);
/* initialize hardware random number generator */
hwrng_init
();
uint8_t
l_private1
[
curve_size
];
uint8_t
l_private1
[
curve_size
];
uint8_t
l_private2
[
curve_size
];
uint8_t
l_private2
[
curve_size
];
...
...
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