Register ch438 to character driver
This commit is contained in:
@@ -587,6 +587,11 @@ config NSH_DISABLE_XD
|
||||
bool "Disable xd"
|
||||
default y if DEFAULT_SMALL
|
||||
default n if !DEFAULT_SMALL
|
||||
|
||||
config NSH_DISABLE_CH438
|
||||
bool "Disable the ch438 demo."
|
||||
default n
|
||||
|
||||
config NSH_DISABLE_HCHO_TB600B_WQ_HCHO1OS
|
||||
bool "Disable the sensor tb600b_wq_hcho1os."
|
||||
default n
|
||||
|
||||
@@ -1417,7 +1417,9 @@ int nsh_foreach_var(FAR struct nsh_vtbl_s *vtbl, nsh_foreach_var_t cb,
|
||||
FAR void *arg);
|
||||
#endif
|
||||
|
||||
int cmd_Ch438(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
#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
|
||||
|
||||
#if defined(CONFIG_APPLICATION_SENSOR_HCHO_TB600B_WQ_HCHO1OS) && !defined(CONFIG_NSH_DISABLE_HCHO_TB600B_WQ_HCHO1OS)
|
||||
int cmd_Hcho1os(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
#include "nsh.h"
|
||||
#include "nsh_console.h"
|
||||
|
||||
extern int FrameworkInit(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: cmd_Ch438
|
||||
****************************************************************************/
|
||||
#if defined(CONFIG_BSP_USING_CH438) && !defined(CONFIG_NSH_DISABLE_CH438)
|
||||
extern void CH438Demo(void);
|
||||
int cmd_Ch438(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
@@ -45,8 +47,7 @@ int cmd_Ch438(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
CH438Demo();
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: cmd_Hcho1os
|
||||
|
||||
@@ -590,7 +590,9 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
{ "xd", cmd_xd, 3, 3, "<hex-address> <byte-count>" },
|
||||
#endif
|
||||
|
||||
{ "ch438", cmd_Ch438, 1, 1, "[ch438 demo cmd.]" },
|
||||
#if defined(CONFIG_BSP_USING_CH438) && !defined(CONFIG_NSH_DISABLE_CH438)
|
||||
{ "ch438", cmd_Ch438, 1, 1, "[ch438 demo cmd.]" },
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_APPLICATION_SENSOR_HCHO_TB600B_WQ_HCHO1OS) && !defined(CONFIG_NSH_DISABLE_HCHO_TB600B_WQ_HCHO1OS)
|
||||
{ "hcho1os", cmd_Hcho1os, 1, 1, "[get the concentration of formaldehyde with sensor tb600b_wq_hcho1os.]" },
|
||||
|
||||
@@ -1812,6 +1812,38 @@ config DEBUG_VIDEO_INFO
|
||||
Enable video informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_VIDEO
|
||||
|
||||
config DEBUG_CH438
|
||||
bool "CH438 Debug Features"
|
||||
default n
|
||||
---help---
|
||||
Enable CH438 debug features.
|
||||
|
||||
if DEBUG_CH438
|
||||
|
||||
config DEBUG_CH438_ERROR
|
||||
bool "CH438 Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable CH438 error output to SYSLOG.
|
||||
|
||||
config DEBUG_CH438_WARN
|
||||
bool "CH438 Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable CH438 warning output to SYSLOG.
|
||||
|
||||
config DEBUG_CH438_INFO
|
||||
bool "CH438 Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable CH438 informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_CH438
|
||||
|
||||
endif # DEBUG_FEATURES
|
||||
|
||||
config ARCH_HAVE_STACKCHECK
|
||||
|
||||
Reference in New Issue
Block a user