Protocol tidy-ups.

This commit is contained in:
Daniel Beer 2010-01-07 16:27:37 +13:00
parent 187bcb283c
commit 7eec63c431
1 changed files with 2 additions and 10 deletions

12
fet.c
View File

@ -574,7 +574,7 @@ static int do_identify(void)
return 0;
}
if (xfer(40, NULL, 0, 2, 0, 0) < 0)
if (xfer(0x28, NULL, 0, 2, 0, 0) < 0)
return -1;
if (!fet_reply.data) {
@ -861,7 +861,7 @@ const struct device *fet_open(const struct fet_transport *tr,
(proto_flags & FET_PROTO_SPYBIWIRE) ? "Spy-Bi-Wire" : "JTAG");
/* set VCC */
if (xfer(C_VCC, NULL, 0, 2, vcc_mv, 0) < 0) {
if (xfer(C_VCC, NULL, 0, 1, vcc_mv) < 0) {
fprintf(stderr, "fet: set VCC failed\n");
return NULL;
}
@ -874,14 +874,6 @@ const struct device *fet_open(const struct fet_transport *tr,
return NULL;
}
/* I don't know what this is, but it appears to halt the MSP. Without
* it, memory reads return garbage. This is RF2500-specific.
*/
if (fet_is_rf2500 && xfer(0x28, NULL, 0, 2, 0, 0) < 0) {
fprintf(stderr, "fet: command 0x28 failed\n");
return NULL;
}
/* Who knows what this is. Without it, register reads don't work.
* This is RF2500-specific.
*/