This routine decodes bus traffic and outputs the data to an output file. This routine works on a sample buffer captured using the StartCapture routine.
Calling Convention
int DecodeUSB (unsigned long *SampleBuffer, unsigned char *OutFilename, long StartSample, long EndSample, long
NumberOfSamples, long ShowEndpoint, long ShowAddress, long DPlus, long DMinus, long Speed, long Rate, long SOF, long delimiter, long showall, long hex, char *ProtocolDefinitionFilename, char
*ProtocolOutputFilename, char *ErrorString)
• SampleBuffer: pointer to the sample buffer that contains the acquired sample data. Each sample is contained in a long (4 byte) value with the low two bytes being the 16 digital
152 USBee DX Test Pod User’s Manual lines and the high two bytes being two 8-bit ADC values for each of the two analog channels which are not used.
• OutFilename: pointer to the filename string to write the decoded data to. • StartSample: the index of the first sample to start decoding
• EndSample: the index of the last sample to decode • NumberOfSamples: The total Sample Buffer Size
• ShowEndpoint: 999 = show all traffic, otherwise show only this USB endpoint number traffic
• ShowAddress: 999 = show all USB devices, otherwise only show the USB device with this USB address
• DPlus: Which signal (0 – 15) to use for the D Plus signal • DMinus: Which signal (0 – 15) to use for the D Minus signal • Speed: 0 = Low Speed USB, 1 = Full Speed USB
• Rate is the rate at which samples were taken during StartCapture: o 247 = 24Msps (must use this for Full Speed USB) o 167 = 16 Msps o 127 = 12 Msps o 87 = 8 Msps o 67 = 6 Msps o 47 = 4 Msps o 37 = 3 Msps o 27 = 2 Msps o 17 = 1 Msps
• SOF: 0 = do not show the SOF (Start of Frames), 1 = show SOFs • Delimeter: 0 = no delimiter, 1 = Comma delimeter, 2 = Space delimeter • Showall: 0 = Only show the data payload, 1 = show all packet details • Hex: 0 = display data in decimal, 1 = display data in hex
• ProtocolDefinitionFilename – filename for the Protocol Definition File to use to create a PacketPresenter file. If this value is 0 then the PacketPresenter feature is turned off. • ProtocolOutputFilename – filename that is created for the output of the PacketPresenter. • ErrorString – string that holds an error description of the routine returns an error. Return Value:
• TRUE – No Error during processing
• FALSE – Error while processing. The ErrorString contains a description of the error to present to the user.
DECODESPI
This routine decodes bus traffic and outputs the data to an output file. This routine works on a sample buffer captured using the StartCapture routine.
Calling Convention
int DecodeSPI (unsigned long *SampleBuffer, unsigned char
*OutFilename, long StartSample, long EndSample, long Rate, unsigned long SS, unsigned long SCK, unsigned long MOSI, unsigned long MISO, unsigned long MISOEdge, unsigned long MOSIEdge, unsigned long delimiter, unsigned long hex, unsigned long UseSS, long BytesPerLine, char *ProtocolDefinitionFilename, char *ProtocolOutputFilename, char *ErrorString)
• SampleBuffer: pointer to the sample buffer that contains the acquired sample data. Each sample is contained in a long (4 byte) value with the low two bytes being the 16 digital lines and the high two bytes being two 8-bit ADC values for each of the two analog channels which are not used.
• OutFilename: pointer to the filename string to write the decoded data to. • StartSample: the index of the first sample to start decoding
• EndSample: the index of the last sample to decode • NumberOfSamples: The total Sample Buffer Size
• Rate is the rate at which samples were taken during StartCapture: o 247 = 24Msps (must use this for Full Speed USB) o 167 = 16 Msps o 127 = 12 Msps o 87 = 8 Msps o 67 = 6 Msps o 47 = 4 Msps o 37 = 3 Msps o 27 = 2 Msps o 17 = 1 Msps
• SS: Which signal (0 – 15) to use for the Slave Select signal • SCK: Which signal (0 – 15) to use for the clock signal • MISO: Which signal (0 – 15) to use for the MISO signal • MOSI: Which signal (0 – 15) to use for the MOSI signal
• MOSIEdge: 0 = use falling edge of SCK to sample data on MOSI, 1 = use rising edge • MISOEdge: 0 = use falling edge of SCK to sample data on MISO, 1 = use rising edge • Delimeter: 0 = no delimiter, 1 = Comma delimeter, 2 = Space delimeter
• Showall: 0 = Only show the data payload, 1 = show all packet details • Hex: 0 = display data in decimal, 1 = display data in hex
• UseSS: 0 = don’t use an SS signal, 1 = use the SS signal • BytesPerLine: How many output words are on each output line.
• ProtocolDefinitionFilename – filename for the Protocol Definition File to use to create a PacketPresenter file. If this value is 0 then the PacketPresenter feature is turned off. • ProtocolOutputFilename – filename that is created for the output of the PacketPresenter.
154 USBee DX Test Pod User’s Manual Return Value:
• TRUE – No Error during processing
• FALSE – Error while processing. The ErrorString contains a description of the error to present to the user.
DECODEI2C
This routine decodes bus traffic and outputs the data to an output file. This routine works on a sample buffer captured using the StartCapture routine.
Calling Convention
int DecodeI2C (unsigned long *SampleBuffer, unsigned char
*OutFilename, long StartSample, long EndSample, long Rate, unsigned long SDA, unsigned long SCL, long showack, long delimiter, long showall, long hex, char *ProtocolDefinitionFilename, char *ProtocolOutputFilename, char *ErrorString)
• SampleBuffer: pointer to the sample buffer that contains the acquired sample data. Each sample is contained in a long (4 byte) value with the low two bytes being the 16 digital lines and the high two bytes being two 8-bit ADC values for each of the two analog channels which are not used.
• OutFilename: pointer to the filename string to write the decoded data to. • StartSample: the index of the first sample to start decoding
• EndSample: the index of the last sample to decode • NumberOfSamples: The total Sample Buffer Size
• Rate is the rate at which samples were taken during StartCapture: o 247 = 24Msps (must use this for Full Speed USB) o 167 = 16 Msps o 127 = 12 Msps o 87 = 8 Msps o 67 = 6 Msps o 47 = 4 Msps o 37 = 3 Msps o 27 = 2 Msps o 17 = 1 Msps
• SDA: Which signal (0 – 15) to use for the SDA signal • SCL: Which signal (0 – 15) to use for the SCL signal
• ShowAck: 0 = Do not show each byte ACK values, 1 = show the ACK value after each byte • Delimeter: 0 = no delimiter, 1 = Comma delimeter, 2 = Space delimeter
• Showall: 0 = Only show the data payload, 1 = show all packet details • Hex: 0 = display data in decimal, 1 = display data in hex
• ProtocolDefinitionFilename – filename for the Protocol Definition File to use to create a PacketPresenter file. If this value is 0 then the PacketPresenter feature is turned off. • ProtocolOutputFilename – filename that is created for the output of the PacketPresenter. • ErrorString – string that holds an error description of the routine returns an error.
Return Value:
• TRUE – No Error during processing
• FALSE – Error while processing. The ErrorString contains a description of the error to present to the user.