appendCrc function

void appendCrc(
  1. List<int> data
)

Calculate and append checksum

Implementation

void appendCrc(List<int> data) {
  int crc = 0xFF;
  for (int index = 1; index < data.length; ++index) crc ^= data[index];
  data.add(crc);
}