Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
a637eeaf
Commit
a637eeaf
authored
Aug 20, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:lib: add helper to restart CPU
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
789c76fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
libmockturtle.h
software/lib/libmockturtle.h
+13
-0
No files found.
software/lib/libmockturtle.h
View file @
a637eeaf
...
...
@@ -130,6 +130,19 @@ extern int trtl_cpu_enable(struct trtl_dev *trtl, unsigned int index);
extern
int
trtl_cpu_disable
(
struct
trtl_dev
*
trtl
,
unsigned
int
index
);
extern
int
trtl_cpu_is_enable
(
struct
trtl_dev
*
trtl
,
unsigned
int
index
,
unsigned
int
*
enable
);
/**
* It disable and re-enable the CPU to perform a restart
*/
static
inline
int
trtl_cpu_restart
(
struct
trtl_dev
*
trtl
,
unsigned
int
index
)
{
int
err
;
err
=
trtl_cpu_disable
(
trtl
,
index
);
if
(
err
)
return
-
1
;
return
trtl_cpu_enable
(
trtl
,
index
);
}
/**@}*/
/**
...
...
Write
Preview
Markdown
is supported
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