printf("Pull down BCK data.2\n"); CLR_BCK(data); getch(); printf("Pull up BCK data.2\n"); SET_BCK(data); getch();
printf("Pull down DATA data.3\n"); CLR_DATA(data); getch(); printf("Pull up DATA data.3\n"); SET_DATA(data); getch(); } // Note: the size of buffer to send must be dword multiple // size is the number of bytes to send void short_delay(int n) { int i; for(i=0;i {int temp =0;} } int send_spi_data(unsigned char *buffer, unsigned long size) { unsigned char buff[1024]; unsigned char *buf=buff; unsigned char data; int i,j,k; data =0; if((size%4)!=0) return FALSE; memcpy(buff,buffer,size);