通讯协议制定之常用校验的实现1.异或校验校验和CRC8和CRC16校验附在线校验网站
1.异或校验#include<stdio.h> typedef unsigned char uint8_t;uint8_t XOR_check(uint8_t *Buf, uint8_t Len){ uint8_t i = 0; uint8_t x = 0; for(i=0; i<Len; i++) { x = x^(*(Buf+i)); } return x;} int main(){ uint8_t tx[2]