/**
 * \file    cli_cmd_base.h
 * \brief   
 * 
 * \par     Copyright (c) 2018 UWE Technologies Corp., Ltd. All Rights Reserved.
 * \author  James
 * \date    2018-07-24
 * \version 
 * 
 * \history 
 *  Date        Note
 *  2018-07-24  Original Creation
 * 
 */
 
#ifndef __CLI_CMD_BASE_H_
#define __CLI_CMD_BASE_H_


#include <stdarg.h>
#include "cli_engine.h"
#include "sys_config.h"

#if CLI_ENABLED

/* Command definitions */

extern const char * const g_cli_dbg_lvl_str[SYS_DEBUG_LEVEL_END];
extern const char * const g_cli_onoff_str[2];
extern const char * const g_cli_true_str[2];


#if CLI_INCLUDE_RESET
extern const char * const g_cli_cmd_rst_help[];
int cli_cmd_rst(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_VER
/** Version help */
extern const char * const g_cli_cmd_ver_help[];
int cli_cmd_ver(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_REG
extern const char * const g_cli_cmd_reg_read_help[];
int cli_cmd_reg_read(int argc, char *argv[]);

extern const char * const g_cli_cmd_reg_write_help[];
int cli_cmd_reg_write(int argc, char *argv[]);
#endif /* CLI_INCLUDE_REG */

#if CLI_INCLUDE_DM
/** Display memory help */
extern const char * const g_cli_cmd_dm_help[];
int cli_cmd_dm(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_GPIO
extern const char * const g_cli_cmd_gpio_help[];
int cli_cmd_gpio(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_GPIO_CAP
extern const char * const g_cli_cmd_gpio_cap_help[];
int cli_cmd_gpio_cap(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_ADC
extern const char * const g_cli_cmd_adc_help[];
int cli_cmd_adc(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_SPI
extern const char * const g_cli_cmd_spi_help[];
int cli_cmd_spi(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_I2C
extern const char * const g_cli_cmd_i2c_help[];
int cli_cmd_i2c(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_PWM
extern const char * const g_cli_cmd_pwm_help[];
int cli_cmd_pwm(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_WDT
extern const char * const g_cli_cmd_wdt_help[];
int cli_cmd_wdt(int argc, char *argv[]);
#endif

#if CLI_INCLUDE_UART
extern const char * const g_cli_cmd_uart1_help[];
int cli_cmd_uart(int argc, char *argv[]);
#endif


#if CLI_INCLUDE_SYS
/** System information help */
extern const char * const g_cli_cmd_sys_help[];
int cli_cmd_sys(int argc, char *argv[]);
#endif


#if CLI_INCLUDE_CFG
/** System configuration help */
extern const char * const g_cli_cmd_cfg_help[];
int cli_cmd_cfg(int argc, char *argv[]);
#endif


/** \brief Basic commands initialization
 *
 */
void cli_cmd_base_init();


#endif


#endif /* #ifndef __CLI_CMD_BASE_H_ */

