64 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/****************************************************************************
 | 
						|
 | 
						|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
 | 
						|
 | 
						|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
 | 
						|
be copied by any method or incorporated into another program without
 | 
						|
the express written consent of Aerospace C.Power. This Information or any portion
 | 
						|
thereof remains the property of Aerospace C.Power. The Information contained herein
 | 
						|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
 | 
						|
liability for its use in any way and conveys no license or title under
 | 
						|
any patent or copyright and makes no representation or warranty that this
 | 
						|
Information is free from patent or copyright infringement.
 | 
						|
 | 
						|
****************************************************************************/
 | 
						|
 | 
						|
#ifndef _APP_ATCMD_HANDLE_H_
 | 
						|
#define _APP_ATCMD_HANDLE_H_
 | 
						|
 | 
						|
#include "app_types.h"
 | 
						|
#include "app_atcmd_proc.h"
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
   extern "C" {
 | 
						|
#endif
 | 
						|
 | 
						|
#define ATCMD_SEND_MAX      512
 | 
						|
/* delaytime max fill count */
 | 
						|
#define ATCMD_DALAYTIME_PAD_MAX      1024
 | 
						|
/* delaytime max sequence number */
 | 
						|
#define ATCMD_DALAYTIME_SN_MAX       1000
 | 
						|
 | 
						|
#define ATCMD_STR_PAD_LEN   32
 | 
						|
#define ATCMD_STR_BUF_LEN   (ATCMD_SEND_MAX * 2 + 32)
 | 
						|
#define ATCMD_IOCTRL_TEST   0
 | 
						|
 | 
						|
#define ATCMD_GET_GPIO      0
 | 
						|
#define ATCMD_SET_GPIO      1
 | 
						|
#define ATCMD_MAC_UNLOCK    0
 | 
						|
#define ATCMD_MAC_LOCK      1
 | 
						|
 | 
						|
#define ATCMD_PRINT(fmt, ...) \
 | 
						|
do { \
 | 
						|
    iot_cus_printf("\n[ATCMD]: "fmt, ##__VA_ARGS__); \
 | 
						|
} while (0)
 | 
						|
 | 
						|
void app_atcmd_onoffline_rsp(uint8_t *mac, uint8_t flag);
 | 
						|
void app_atcmd_set_gpio_rsp(uint8_t * data, uint16_t data_length);
 | 
						|
void app_atcmd_get_gpio_rsp(uint8_t * data, uint16_t data_length);
 | 
						|
uint16_t app_atcmd_uart_tx(uint8_t *data, uint16_t data_len,
 | 
						|
    uint8_t *src_addr, uint8_t format, uint8_t recv_flag);
 | 
						|
cmd_tbl_t *atcmd_find_cmd(char *cmd);
 | 
						|
void app_atcmd_init(void);
 | 
						|
uint16_t app_atcmd_plc_linktest_handle(uint8_t *data, uint16_t data_len,
 | 
						|
    uint8_t *src_addr);
 | 
						|
uint16_t app_atcmd_signal_test_handle(uint8_t *data, uint16_t data_len,
 | 
						|
    void *rx_info);
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
 }
 | 
						|
#endif
 | 
						|
 | 
						|
#endif  /* _APP_ATCMD_HANDLE_H_ */
 | 
						|
 |