/* * Attach t1 protocol */ int t1_init(t1_state_t * t1, int lun) { t1_set_defaults(t1); t1_set_param(t1, IFD_PROTOCOL_T1_CHECKSUM_LRC, 0); t1_set_param(t1, IFD_PROTOCOL_T1_STATE, SENDING); t1_set_param(t1, IFD_PROTOCOL_T1_MORE, FALSE); t1->lun = lun; return 0; }
/* * Attach t1 protocol */ static int t1_init(ifd_protocol_t * prot) { t1_state_t *t1 = (t1_state_t *) prot; t1_set_defaults(t1); t1_set_checksum(t1, IFD_PROTOCOL_T1_CHECKSUM_LRC); /* If the device is attached through USB etc, assume the * device will do the framing for us */ if (prot->reader->device->type != IFD_DEVICE_TYPE_SERIAL) t1->block_oriented = 1; return 0; }