add touchnsh/defconfig

This commit is contained in:
wgzAIIT
2022-10-25 17:41:08 +08:00
parent 6794cb03a8
commit 490d372b47
5 changed files with 88 additions and 0 deletions
@@ -555,6 +555,10 @@ config NSH_DISABLE_W5500
bool "Disable the w5500 demo."
default n
config NSH_DISABLE_TOUCH
bool "Disable the gt911 touch screen demo."
default n
config NSH_DISABLE_CH438
bool "Disable the ch438 demo."
default n
@@ -1458,6 +1458,10 @@ int nsh_foreach_var(FAR struct nsh_vtbl_s *vtbl, nsh_foreach_var_t cb,
int cmd_w5500(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif
#if defined(CONFIG_BSP_USING_TOUCH) && !defined(CONFIG_NSH_DISABLE_TOUCH)
int cmd_Touch(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif
#if defined(CONFIG_BSP_USING_CH438) && !defined(CONFIG_NSH_DISABLE_CH438)
int cmd_Ch438(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif
@@ -64,6 +64,19 @@ int cmd_w5500(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
}
#endif
/****************************************************************************
* Name: cmd_Touch
****************************************************************************/
#if defined(CONFIG_BSP_USING_TOUCH) && !defined(CONFIG_NSH_DISABLE_TOUCH)
extern void GT911_test(void);
int cmd_Touch(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
nsh_output(vtbl, "Hello, world!\n");
GT911_test();
return OK;
}
#endif
/****************************************************************************
* Name: cmd_Ch438
****************************************************************************/
@@ -604,6 +604,10 @@ static const struct cmdmap_s g_cmdmap[] =
{ "w5500", cmd_w5500, 1, 1, "[w5500 demo cmd.]" },
#endif
#if defined(CONFIG_BSP_USING_TOUCH) && !defined(CONFIG_NSH_DISABLE_TOUCH)
{ "touch", cmd_Touch, 1, 1, "[gt911 touch screen demo cmd.]" },
#endif
#if defined(CONFIG_BSP_USING_CH438) && !defined(CONFIG_NSH_DISABLE_CH438)
{ "ch438", cmd_Ch438, 1, 1, "[ch438 demo cmd.]" },
#endif