K kenten123 Member Licensed User Longtime User Jun 4, 2014 #1 I'm trying to create a USB interface to an FTDI FT245R device. I have the Java Object library working with some methods of the device but one has me stumped. The device API is 9.20 setBitMode Definition: public boolean setBitMode(byte mask, byte bitMode) using result = FTdev.RunMethodJO("setBitMode", Array(0,0)) gives the error java.lang.RuntimeException: Method: setBitMode not matched. Seems it should be straightforward passing two values but alas... Thanks in advance for any help. Ken
I'm trying to create a USB interface to an FTDI FT245R device. I have the Java Object library working with some methods of the device but one has me stumped. The device API is 9.20 setBitMode Definition: public boolean setBitMode(byte mask, byte bitMode) using result = FTdev.RunMethodJO("setBitMode", Array(0,0)) gives the error java.lang.RuntimeException: Method: setBitMode not matched. Seems it should be straightforward passing two values but alas... Thanks in advance for any help. Ken
stevel05 Expert Licensed User Longtime User Jun 4, 2014 #2 By passing Array(0,0) you are passing ints to the routine, when bytes are required. Hence the not matched message. Dim a variable as byte, then pass that: Code: Copy Dim B As Byte = 0 result = FTdev.RunMethodJO("setBitMode", Array(B,B)) Upvote 0
By passing Array(0,0) you are passing ints to the routine, when bytes are required. Hence the not matched message. Dim a variable as byte, then pass that: Code: Copy Dim B As Byte = 0 result = FTdev.RunMethodJO("setBitMode", Array(B,B))
K kenten123 Member Licensed User Longtime User Jun 4, 2014 #3 Steve - Many thanks for your rapid and effective response. Upvote 0