#include "cmd_pin.h"
#include "cmd_port.h"
+#ifdef TARGET_TMS570_RPP
+#include "cmd_dac.h"
+#include "cmd_emac.h"
+#include "cmd_fray.h"
+#include "cmd_din.h"
+#include "cmd_hbr.h"
+#include "cmd_hout.h"
+#include "cmd_lin.h"
+#include "cmd_lout.h"
+#include "cmd_nc.h"
+#include "cmd_netstats.h"
+#include "cmd_sdram.h"
+#include "cmd_spi.h"
+#include "cmd_vbat.h"
+#include "cmd_motor_example.h"
+#include "cmd_fr_basic_test.h"
+#endif
+
#ifndef DOCGEN
#include "rpp/rpp.h"
/** Root list in which commands are stored */
cmd_des_t const **cmd_list;
+#ifdef TARGET_TMS570_RPP
+int cmd_do_sleep(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
+{
+ hal_gpio_pin_set_value(PIN_DSC_CANNSTB, 1);
+ hal_gpio_pin_set_value(PIN_DSC_CANEN, 1);
+ hal_gpio_pin_set_value(PIN_DSC_LIN2NSLP, 1);
+ hal_gpio_pin_set_value(PIN_DSC_LIN1NSLP, 1);
+ vTaskDelay(10/portTICK_RATE_MS);
+ hal_gpio_pin_set_value(PIN_DSC_LIN2NSLP, 0);
+ hal_gpio_pin_set_value(PIN_DSC_LIN1NSLP, 0);
+ hal_gpio_pin_set_value(PIN_DSC_CANNSTB, 0);
+ return 0;
+}
+
+/** Command descriptor for sleep command */
+cmd_des_t const cmd_des_sleep = {
+ 0, 0,
+ "sleep","Sleep the board",
+ "### Syntax ###\n"
+ "\n"
+ " sleep\n"
+ "\n"
+ "### Description ###\n"
+ "\n"
+ "This command configures the LIN and CAN peripherals to enter sleep mode\n"
+ "and turn the whole device into sleep mode. External signal on CAN or\n"
+ "LIN will wake the device up.\n",
+ CMD_HANDLER(cmd_do_sleep), (void *)&cmd_list
+};
+#endif
+
/** Command descriptor for show help command */
cmd_des_t const cmd_des_help = {
0, 0,
/** @brief Main list of commands */
cmd_des_t const *cmd_list_main[] = {
&cmd_des_help,
+#ifdef TARGET_TMS570_RPP
+ &cmd_des_sleep,
+#endif
&cmd_des_version,
CMD_DES_INCLUDE_SUBLIST(cmd_list_adc),
CMD_DES_INCLUDE_SUBLIST(cmd_list_can),
+#ifdef TARGET_TMS570_RPP
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_dac),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_din),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_emac),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_fr_basic_test),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_fray),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_hbr),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_hout),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_lin),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_lout),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_motor_example),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_nc),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_netstats),
+#endif
CMD_DES_INCLUDE_SUBLIST(cmd_list_pin),
CMD_DES_INCLUDE_SUBLIST(cmd_list_port),
+#ifdef TARGET_TMS570_RPP
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_sdram),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_spi),
+ CMD_DES_INCLUDE_SUBLIST(cmd_list_vbat),
+#endif
NULL
};