#include "cmd_spi.h"
#include "cmd_vbat.h"
#include "cmd_motor_example.h"
+#include "cmd_fr_basic_test.h"
#ifndef DOCGEN
return 0;
}
+#include <version.h>
+
+int cmd_do_version(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
+ rpp_sci_printf("version=%s\n", GIT_VERSION);
+ return 0;
+}
+
#endif /* DOCGEN */
/** Root list in which commands are stored */
CMD_HANDLER(cmd_do_help), (void *)&cmd_list
};
+cmd_des_t const cmd_des_version={
+ 0, 0,
+ "version","Print version of the software",
+ "=== Syntax ===\n"
+ "\n"
+ " version\n"
+ "\n"
+ "=== Description ===\n"
+ "\n"
+ "This command prints the version of the test software. The version\n"
+ "number is the output of 'git describe' command, i.e. it is composed\n"
+ "from the last tag in the git repository, the number of commits since\n"
+ "the tag and the abbreviated commit hash.\n"
+ "\n"
+ "=== Example ===\n"
+ "\n"
+ " --> version\n"
+ " version=v0.2-109-ga81a9dd\n",
+ CMD_HANDLER(cmd_do_version),
+};
+
/* ------------------------
* Command lists definitons
* ------------------------
cmd_des_t const *cmd_list_main[]={
&cmd_des_help,
&cmd_des_sleep,
+ &cmd_des_version,
CMD_DES_INCLUDE_SUBLIST(cmd_list_adc),
CMD_DES_INCLUDE_SUBLIST(cmd_list_can),
CMD_DES_INCLUDE_SUBLIST(cmd_list_dac),
CMD_DES_INCLUDE_SUBLIST(cmd_list_spi),
CMD_DES_INCLUDE_SUBLIST(cmd_list_vbat),
CMD_DES_INCLUDE_SUBLIST(cmd_list_motor_example),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_fr_basic_test),
NULL
};