PV1_MakeProject/include/boardlink_iot.h

28 lines
587 B
C

#ifndef BOARDLINK_IOT_H
#define BOARDLINK_IOT_H
#define BL_IOT_MSG_TAGS ("BLNLINK")
#define BL_MAX_MSG (1024)
typedef enum
{
MSG_IN_DISCOVERY_MODE = 0,
MSG_OUT_DISCOVERY_MODE,
MSG_BYPASS_MODE,
} BL_IOT_MSG_TYPE;
#pragma pack (push)
#pragma pack (1)
typedef struct
{
unsigned char msgTags[8];
unsigned char msgType;
unsigned int msglen;
unsigned char msgData[BL_MAX_MSG];
} BL_IOT_MSG, *PBL_IOT_MSG;
#pragma pack (pop)
int BL_Init(void);
int BL_SendMessage(unsigned char* pData, unsigned int len);
#endif