OSDN Git Service

Make Mifare Classic increment/decrement operands little endian
authorNick Pelly <npelly@google.com>
Tue, 25 Jan 2011 15:45:07 +0000 (07:45 -0800)
committerNick Pelly <npelly@google.com>
Tue, 25 Jan 2011 15:45:07 +0000 (07:45 -0800)
commitb134223f91c8801d577cb72e92a37cb65fec717a
treee5837efbb3306dca2f31e899d938b1baae9d09d2
parentcc019c0caa0dd984404dea4d6623ae9d7b8474f1
Make Mifare Classic increment/decrement operands little endian

Also make sure they are non-negative.

This is not documented in Mifare Classic spec, but based on findings from NXP:
- Operand should be stored in little-endian format in the transceive buffer
- Tag ignores the sign bit on the operand, its effectively 31-bit unsigned
- Overflow and underflow generates an error.

Change-Id: Id3389b3894ded732c4b00d564ca53f5df651359e
core/java/android/nfc/tech/MifareClassic.java