Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 0x08: { //WriteRegister Page 78 OK
- int address;
- int value;
- uint8_t dataSum = btDCS;
- for (int i = 0; i < abtRxBuf[3] - 2; i += 3) {
- memcpy(&address, (int*) abtRxBuf + 7 + i, 2);
- memcpy(&value, (int*) abtRxBuf + 9 + i, 1);
- pn532_packetbuffer[0/*1*/] = address >> 8;
- pn532_packetbuffer[1/*2*/] = address & 0xff;
- pn532_packetbuffer[2/*2*/] = value;
- Wire.write(pn532_packetbuffer, 3);
- Serial.write(pn532_packetbuffer, 3);
- dataSum -= sum_array(pn532_packetbuffer, 3);
- }
- writePostStuff(dataSum);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement