You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

/*
* lora_at.h
*
* Created on: 2024419
* Author: liuyu
*/
#ifndef _AT_H_
#define _AT_H_
#include "uart.h"
#define AT_VER "+AT_V1.0.0"
//ATָ�ָ���ƥ����
#define LORA_AT_IVER "+VER" //AT ָ���汾
#define LORA_AT_IREBOOT "+RESET" //����λ
#define LORA_AT_IDEFAULT "+DEFAULT" //�ָ���������
#define LORA_AT_GETSTATUS "+CFG" //��ȡ�ն�������Ϣ
#define LORA_AT_UBAUD "+BAUD" //������
#define LORA_AT_UPARITY "+PARITY" //У��λ
#define LORA_AT_HTXCFG "+HTXCFG" //��������
#define LORA_AT_HSEND "+HSEND" //��text��ʽ����
#define LORA_AT_HSENDB "+HSENDB" //��16���Ʒ���
#define LORA_AT_HRXCFG "+HRXCFG" //��������
#define LORA_AT_HREC "+HREC" //��text��ʽ����
#define LORA_AT_HRECB "+HRECB" //��16���ƽ���
//atָ���б��ṹ��
typedef struct atcmd_s
{
const char *cmd_name;//ATָ������
const char *test_cmd_str;//��ʾ��Ϣ�ַ���
int (*query_cmd)(void);//��ѯ������Ӧ�ĺ���
int (*exec_cmd)(char *str);//ִ�в������������
int (*exec_cmd_no_para)(void);//ִ�в������������
} atcmd_t;
//AT��������ֵ
#define AT_OK 0 //��ȷ
#define AT_FORMAT_ERR 1 //��ʽ����
#define AT_NOTFOUND_ERR 2 //�Ҳ�������ָ��
#define AT_NOTALLOW_ERR 3 //����ָ�����ִ��
#define AT_HELPNULL_ERR 4 //û�а�����Ϣ
#define AT_EXEC_ERR 5 //ִ�д���
#define AT_PARA_ERR 6 //��������
//ֵ
#define RETURN_BUFF_SZIE 100 //AT�������ݵĻ�������С
//��������
void lora_at_process(void);
#endif /* USER_LORA_AT_H_ */