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
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
0be8fa23
Commit
0be8fa23
authored
Dec 02, 2016
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: improve code readability
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
8ddd03ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
mockturtle-list.c
tools/mockturtle-list.c
+21
-6
No files found.
tools/mockturtle-list.c
View file @
0be8fa23
...
...
@@ -39,10 +39,25 @@ static void help(char *name)
exit
(
1
);
}
/**
* It shows information about a given Mock Turtle device
* @param[in] trtl Mock Turtle device instance
*/
static
void
trtl_list_device_info
(
struct
trtl_dev
*
trtl
)
{
unsigned
int
appid
=
0
,
cpucount
=
0
;
trtl_app_id_get
(
trtl
,
&
appid
);
trtl_cpu_count
(
trtl
,
&
cpucount
);
fprintf
(
stdout
,
" Application ID: 0x%08x
\n
"
,
appid
);
fprintf
(
stdout
,
" Number of CPU: %d
\n
"
,
cpucount
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
char
**
list
;
unsigned
int
appid
=
0
,
cpucount
=
0
;
struct
trtl_dev
*
trtl
;
char
c
;
int
i
,
verbose
=
0
,
err
;
...
...
@@ -78,11 +93,11 @@ int main(int argc, char *argv[])
trtl_strerror
(
errno
));
continue
;
}
if
(
verbose
==
1
)
{
trtl_app_id_get
(
trtl
,
&
appid
);
trtl_cpu_count
(
trtl
,
&
cpucount
);
fprintf
(
stdout
,
" Application ID: 0x%08x
\n
"
,
appid
);
fprintf
(
stdout
,
" Number of CPU: %d
\n
"
,
cpucount
)
;
switch
(
verbose
)
{
case
1
:
trtl_list_device_info
(
trtl
);
break
;
}
trtl_close
(
trtl
);
}
...
...
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