#include #include #include "hat.h" //#define Master #define uint unsigned int #define uchar unsigned char #define BlockSize 10 UINT8 SpData; char temp[BlockSize] ; BYTE rdat; char re_data[8]="12345678"; char spi_data[8]="12345678"; char spi_re_data[8]; uint re_data_num=0; uint spi_re_data_num=0; #define MISO P0_2 #define MOSI P0_3 #define SS_N P0_4 #define SCK P0_5 //定义控制灯的端口 #define led1 P1_0 #define led2 P1_1 #define SS P0_0