From 073dadedf461db08d008771cf86a08edf59c036a Mon Sep 17 00:00:00 2001 From: Michael Brase Date: Sun, 2 Sep 2018 16:51:11 -0500 Subject: [PATCH 1/3] Fix the usb packet field name for recent versions of wireshark --- ftdi2vcd.lua | 2 +- ftdi_dump.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ftdi2vcd.lua b/ftdi2vcd.lua index bed1ac5..4ca3c93 100644 --- a/ftdi2vcd.lua +++ b/ftdi2vcd.lua @@ -18,7 +18,7 @@ local usb_transfer_type_f = Field.new("usb.transfer_type") -local usb_direction_f = Field.new("usb.endpoint_number.direction") +local usb_direction_f = Field.new("usb.endpoint_address.direction") local usb_capdata_f = Field.new("usb.capdata") diff --git a/ftdi_dump.lua b/ftdi_dump.lua index 127e374..8025c3b 100644 --- a/ftdi_dump.lua +++ b/ftdi_dump.lua @@ -18,7 +18,7 @@ local usb_transfer_type_f = Field.new("usb.transfer_type") -local usb_direction_f = Field.new("usb.endpoint_number.direction") +local usb_direction_f = Field.new("usb.endpoint_address.direction") local usb_capdata_f = Field.new("usb.capdata") From a1ac1df22289bec59940ea18c7f2423c875efe96 Mon Sep 17 00:00:00 2001 From: Michael Brase Date: Sat, 22 Sep 2018 17:44:53 -0500 Subject: [PATCH 2/3] Fix length of 1b command --- ftdi2vcd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftdi2vcd.lua b/ftdi2vcd.lua index 4ca3c93..e4e4176 100644 --- a/ftdi2vcd.lua +++ b/ftdi2vcd.lua @@ -119,7 +119,7 @@ function FTDI:cmd_19() end function FTDI:cmd_1b() - local len = self.o:read_uint8() + local len = self.o:read_uint8() + 1 local outval = self.o:read_uint8() self:comment("data out bits", len, "outval", outval) self:clock(len, {TDI = outval}) From abc8a191e4d993d7c7a3f1c2fc3563807ab6a710 Mon Sep 17 00:00:00 2001 From: Michael Brase Date: Sun, 23 Sep 2018 21:58:34 -0500 Subject: [PATCH 3/3] Fix the 2a command to correctly shift the input This command is weird, in that the lsb read in is not necessarily located at bit0. --- ftdi2vcd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftdi2vcd.lua b/ftdi2vcd.lua index e4e4176..0b9377b 100644 --- a/ftdi2vcd.lua +++ b/ftdi2vcd.lua @@ -136,7 +136,7 @@ end function FTDI:cmd_2a() local len = self.o:read_uint8() + 1 - local inval = self.i:read_uint8() + local inval = bit32.rshift(self.i:read_uint8(), 8 - len) self:comment("data in bits", len, "inval", inval) self:clock(len, {TDO = inval}) end