long session_handle;
unsigned char state_buffer[15360], crc_buffer[100];
long crc;
/* session_handle set from a call to TMExtendedStartSession */
...
/* the internal 8-byte ROM buffer contains a valid ROM that is going to be selected to do a device specific operation */
...
/*calculate CRC16 on crc_buffer */
crc = TMCRC(100, crc_buffer, 0, 1);
/* close the session with a call to TMEndSession */
...