READING PLUG AND PLAY INFO
The PNP interface of a card will supply an stream of 'records' about itself when that specific csn is woken up. The first part of this byte stream is the same 9 byte serial number (including checksum) that was provided during serial isolation. Only this time, the data is in bytes rather than psuedo encoded 'one bits'.
After which a variable number of records is provided. Variable meaning it continues until all resources and info about the card are supplied to the interface.
Typically, a 'woken' card will issue the following record stream
9 byte serial number
device id 0
resource config 0
resource config n
device id n
resource configs 0 to n
The structure of each record is fixed as follows <TAG>
|TAG||1 Byte describing this record type.|
|LENGTH||An optional two byte length (lsb first)|
|DATA..............||A variable number of bytes (if any) as determined by the length fields.|
Tag byte encoding
<TAG> [nnnn] data.......
Two types of tag exist. Long, and short format, as defined by bit 7 of the byte
Short format: 0TTTTLLL data....
TTTTTTT is the decode, and the number of data bytes is declared in the next two bytes.
Almost all tag decodes have a fixed length associated with them.