Commit 5eb88175 authored by Aurelio Colosimo's avatar Aurelio Colosimo Committed by Alessandro Rubini

shell: add ppsi-related command

Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 3ad70373
......@@ -21,6 +21,7 @@ int cmd_mode(const char *args[]);
int cmd_calib(const char *args[]);
int cmd_time(const char *args[]);
int cmd_ip(const char *args[]);
int cmd_verbose(const char *args[]);
int cmd_sdb(const char *args[]);
int cmd_mac(const char *args[]);
int cmd_init(const char *args[]);
......
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2012 GSI (www.gsi.de)
* Author: Wesley W. Terpstra <w.terpstra@gsi.de>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
#include <wrc.h>
extern int pp_diag_verbosity;
int cmd_verbose(const char *args[])
{
int v;
v = args[0][0] - '0';
if (v < 0)
v = 0;
else if (v > 2)
v = 2;
pp_printf("PPSI verbosity set to %d\n", v);
pp_diag_verbosity = v;
return 0;
}
......@@ -60,6 +60,9 @@ static const struct shell_cmd cmds_list[] = {
{"init", cmd_init},
#ifdef CONFIG_ETHERBONE
{"ip", cmd_ip},
#endif
#if (defined CONFIG_PPSI) && (defined CONFIG_PPSI_RUNTIME_VERBOSITY)
{"verbose", cmd_verbose},
#endif
{"mac", cmd_mac},
{"sdb", cmd_sdb},
......
......@@ -15,3 +15,4 @@ obj-y += \
shell/cmd_init.o
obj-$(CONFIG_ETHERBONE) += shell/cmd_ip.o
obj-$(CONFIG_PPSI_RUNTIME_VERBOSITY) += shell/cmd_verbose.o
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment