Documentation

Documentation

Includes

stdint.h

#include "stdint.h"
#include "stdint.h"

Macros

Marco __SVC_ASTRO_TIMER__

#define __SVC_ASTRO_TIMER__

      

Functions

Func tuya_cli_init

int tuya_cli_init(void);
/**
 * @brief cli init function,default uart0
 * 
 * @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
 * 
 */

Func tuya_cli_cmd_register

int tuya_cli_cmd_register(const cli_cmd_t *cmd, uint8_t num);
/**
 * @brief cli command register
 *
 * @param[in] cmd Info of one command
 * @param[in] num Number
 *
 * @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
 * 
 */

Func tuya_cli_init_with_uart

int tuya_cli_init_with_uart(uint8_t uart_num);
/**
 * @brief uart cli init
 *
 * @param[in] uart_num The number of UART
 *
 * @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
 * 
 */

Vars

Consts

Types

Typedefs

Typedef cli_cmd_func_cb_t

typedef void (*cli_cmd_func_cb_t)(int argc, char *argv[]);
/**
 * @brief callback for one cli command
 * 
 * @param[in] argc The number of argumnet
 * @param[in] argv The point date of argument
 * 
 */

Typedef cli_cmd_t;

typedef struct {
   /** cli command name */
   char               *name;
   /** cli command help */
   char               *help;
   /** the callback of one command */
   cli_cmd_func_cb_t   func;
} cli_cmd_t;