summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/tpm_test/ftdi_spi_tpm.c2
-rw-r--r--test/tpm_test/mpsse.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/test/tpm_test/ftdi_spi_tpm.c b/test/tpm_test/ftdi_spi_tpm.c
index ac028ef325..6cf8761b24 100644
--- a/test/tpm_test/ftdi_spi_tpm.c
+++ b/test/tpm_test/ftdi_spi_tpm.c
@@ -369,7 +369,7 @@ struct swig_string_data FtdiSendCommandAndWait(char *tpm_command,
for (i = 0; i < command_size; i++) {
if (!(i % 16))
printf("\n");
- printf(" %2.2x", tpm_command[i]);
+ printf(" %2.2x", (uint8_t)tpm_command[i]);
}
printf("\n");
return empty_string_data;
diff --git a/test/tpm_test/mpsse.c b/test/tpm_test/mpsse.c
index 9b8d97e8e3..f54c37bc90 100644
--- a/test/tpm_test/mpsse.c
+++ b/test/tpm_test/mpsse.c
@@ -80,9 +80,11 @@ static struct vid_pid {
int vid;
int pid;
char *description;
+ int use_B;
} supported_devices[] = {
{
- 0x0403, 0x6010, "FT2232 Future Technology Devices International, Ltd"},
+ 0x0403, 0x6010, "FT2232 Future Technology Devices International, Ltd",
+ 1},
{
0x0403, 0x6011, "FT4232 Future Technology Devices International, Ltd"},
{
@@ -405,7 +407,9 @@ struct mpsse_context *MPSSE(int freq, int endianness, const char *serial)
for (i = 0; supported_devices[i].vid != 0; i++) {
mpsse = OpenIndex(supported_devices[i].vid,
supported_devices[i].pid, freq, endianness,
- IFACE_A, NULL, serial, 0);
+ supported_devices[i].use_B ?
+ IFACE_B : IFACE_A,
+ NULL, serial, 0);
if (!mpsse)
continue;