Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Zynq Ultrascale-based System Board
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
41
Issues
41
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
DIOT Zynq Ultrascale-based System Board
Commits
5f4bc4d2
Commit
5f4bc4d2
authored
Jul 18, 2022
by
Alén Arias Vázquez
😎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean function cmd help
parent
a43bf6ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
Makefile
...ject-spec/meta-user/recipes-apps/diot-util/files/Makefile
+1
-0
diot_util.c
...t-spec/meta-user/recipes-apps/diot-util/files/diot_util.c
+15
-7
No files found.
sw/petalinux/project-spec/meta-user/recipes-apps/diot-util/files/Makefile
View file @
5f4bc4d2
...
...
@@ -13,6 +13,7 @@ APP_OBJS = \
fru_utils.o
\
term.o
\
util.o
\
fpga_device.o
\
LDLIBS
+=
-lgpiod
-lreadline
-lsensors
-li2c
CFLAGS
+=
-Wall
-ggdb
-g
-O2
\
...
...
sw/petalinux/project-spec/meta-user/recipes-apps/diot-util/files/diot_util.c
View file @
5f4bc4d2
...
...
@@ -95,15 +95,23 @@ struct command_entry commands_list[] = {
int
cmd_help
(
char
*
params
)
{
struct
command_entry
*
entry
=
commands_list
;
struct
command_entry
*
entry
;
char
buf
[
50
];
/* Print fantray's help if requested */
if
(
params
&&
!
strncmp
(
params
,
"fantray"
,
strlen
(
"fantray"
)))
printf
(
"diot_util for HW version %d
\n
"
,
SB_VER
);
printf
(
"Available commands:
\n
"
);
if
(
params
&&
!
strncmp
(
params
,
"fantray"
,
strlen
(
"fantray"
)))
{
/* Print fantray's help if requested */
entry
=
commands_list_fantray
;
printf
(
"diot_util for HW version %d
\n
"
,
SB_VER
);
printf
(
"Available commands:
\n
"
);
while
(
entry
->
cmd_name
)
{
}
else
if
(
params
&&
!
strncmp
(
params
,
"fantray"
,
strlen
(
"fantray"
)))
{
/* Print gateware if requested */
entry
=
commands_list_fpga_device
;
}
else
{
entry
=
commands_list
;
}
while
(
entry
->
cmd_name
)
{
sprintf
(
buf
,
"%s %s"
,
entry
->
cmd_name
,
entry
->
cmd_params
?
entry
->
cmd_params
:
""
);
printf
(
"%-18s - %s"
,
buf
,
entry
->
cmd_help_string
);
...
...
@@ -599,7 +607,7 @@ char *command_name_generator_fantray(const char *text, int state)
return
NULL
;
}
/* command name generator for
fantray
*/
/* command name generator for
gateware
*/
char
*
command_name_generator_gateware
(
const
char
*
text
,
int
state
)
{
static
int
list_index
,
len
;
...
...
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