msg_packet.h

来自「TI DSP C6713 同相同公司C2812利用MSBSP多功能串口通讯的实例」· C头文件 代码 · 共 43 行

H
43
字号
#ifndef _SPI_H_
#define _SPI_H_

#include "SPORT.h"


#define PACKET_HEAD	0xABAB

typedef struct
{
	unsigned short	PacketHead;
	short 			taArray[8];
	unsigned short	Check_Sum;
}
MASTER_DATA_S;	//occupy 5 INT32

typedef struct
{
	unsigned short	PacketHead;
	unsigned short	Target_x;
	unsigned short	Target_y;
	unsigned short	State;
	unsigned short 	dummy[5];
	unsigned short	Check_Sum;
}
SLAVE_DATA_S;	//occupy 5 INT32

#define PACKET_SIZE_IN_SHORT		(sizeof(SLAVE_DATA_S)/2)

#define PACKET_SIZE_IN_INT			(sizeof(SLAVE_DATA_S)/4)


#define BABU_BSPCH			1		//the challel of the McBSP to BABU
#define BABU_SPORT_ClkGdv	9		//determine the frequence of the commulication to BABU

#define BUDDY_BSPCH			0
#define BUDDY_SPORT_ClkGdv	3		//determine the frequence of the commulication to BABU

#define SPI_BSPCH			1

unsigned short Msg_check_sum(unsigned short *mem, unsigned int size);
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?