lvgl-v7/Origin__V0.3_LVGL7/UART/SimplUART/APP/uart_Net.h

28 lines
651 B
C
Raw Permalink Normal View History

2022-11-19 17:03:00 +00:00
#ifndef _UART_NET_H_
#define _UART_NET_H_
#ifndef u8
#define u8 unsigned char
#define u16 unsigned short
#define u32 unsigned int
#endif
typedef struct{
const u32 TransportDistance; //通讯距离 m
const u32 BandRate; //波特率 bit/s
u32 MessageLenMin; //报文段长度
const u32 (*CalMessageLen)(void*);
}NET_PHY_PROP;
u32 UartBusMessageLenCal(void *priv);
typedef enum{
MSG_LEN_TOO_SHORT, //报文段定于过短
MSG_LEN_TOO_LONG, //报文段定于过长
MSG_SEND_MAY_ERR, //报文段尝试发送失败
}NET_ERROR;
u32 NetInit();
u32 NetSendBase(u8 *data,u32 len,u8 *destAddr);
#endif