引入mqtt 引入cjson

This commit is contained in:
2584532475@qq.com committed 2023-11-30 08:10:01 +08:00
1 parent a69c1a58d6
commit f8591b8b99
86 files changed
+12141 -2157

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#ifndef _NET_DRV_H
#define _NET_DRV_H
typedef enum netDrvState_t
{
Init, // 初始化状态
Join, // 入网
Conn, // 入网成功
Idle // 空闲
} netDrvState_t;
typedef struct netDrv_t
{
int Csq;
char Iccid[20];
netDrvState_t State;
char * rxbuff;
int rx_size; // 接受到的tcp 数据缓存
char * txbuff; // 发送的TCP 数据缓存
int tx_size;
} netDrv_t;
typedef enum CommRet_T
{
RetSucc,
RetErr
} CommRet_T;
extern netDrv_t * g_netDrv;;
void netdrv_service_tx (uint8_t * data, int length);
int netdrv_getdata (uint8_t* buf, int count);
int netdrv_clear (void);
void netdrv_init (void);
void netdrv_reset (void); // 网络链接失败,通知驱动重新启动网络模块
#endif