Bug fix: add required transfer for UIF device init.

This commit is contained in:
Daniel Beer 2009-11-17 15:26:32 +13:00
parent 3e0f736e1d
commit 2057f3ea6a
1 changed files with 7 additions and 0 deletions

7
fet.c
View File

@ -284,6 +284,13 @@ int fet_open(const struct fet_transport *tr, int proto_flags, int vcc_mv)
return -1;
}
if (!fet_is_rf2500 &&
!xfer("\x03\x02\x02\x00\x50\x00\x00\x00\x00\x00\x00\x00", 12,
NULL, 0, NULL)) {
fprintf(stderr, "fet_open: identify failed\n");
return -1;
}
/* set VCC */
vcc[4] = vcc_mv & 0xff;
vcc[5] = vcc_mv >> 8;