nfctype2: Add support for blank tag handling
authorEyal Reizer <eyalr@ti.com>
Wed, 27 Jun 2012 08:12:34 +0000 (11:12 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 27 Jun 2012 09:55:45 +0000 (11:55 +0200)
commit9bb65ad8318bae1e1df5e038d9d54c7fab334371
treed53cfacee797e40fc566e24078fac3b60f88353c
parentc40cb5a3425d7bb25c996f91a5ca64cd1dd32900
nfctype2: Add support for blank tag handling

When using a new tag for the first time, the CC field might not be
initialized (un-formatted tag) this was causing the tag to be dropped.
this patch add handling for such tags:

* When a tag with uninitialized CC block is read, it is marked as blank
  and is not dropped
* Add a new nfctype2_format() function used for initializing the CC block
  in blank t2 flags.
* When writing data to a tag, in case the tag is marked as blank, this api
  can be used in order to format the tag before the data is being written
  to it.
plugins/nfctype2.c