Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
98904f56
Verified
Commit
98904f56
authored
Jul 04, 2019
by
Rahix
Browse files
feat: Print a string before resetting
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
1a693480
Changes
2
Hide whitespace changes
Inline
Side-by-side
bootloader/main.c
View file @
98904f56
...
...
@@ -179,6 +179,14 @@ static inline void boot(const void * vtable){
static
void
pmic_button
(
bool
falling
)
{
if
(
falling
)
{
printf
(
"Resetting ...
\n
"
);
/*
* Give the UART fifo time to clear.
* TODO: Do this properly
*/
for
(
int
i
=
0
;
i
<
0x1000000
;
i
++
)
{
__asm
volatile
(
"nop"
);
}
MXC_GCR
->
rstr0
=
MXC_F_GCR_RSTR0_SYSTEM
;
}
}
...
...
epicardium/main.c
View file @
98904f56
...
...
@@ -40,6 +40,14 @@ void vApiDispatcher(void*pvParameters)
static
void
pmic_button
(
bool
falling
)
{
if
(
falling
)
{
printf
(
"Resetting ...
\n
"
);
/*
* Give the UART fifo time to clear.
* TODO: Do this properly
*/
for
(
int
i
=
0
;
i
<
0x1000000
;
i
++
)
{
__asm
volatile
(
"nop"
);
}
MXC_GCR
->
rstr0
=
MXC_F_GCR_RSTR0_SYSTEM
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment