#include <stdlib.h>
#include <stdio.h>
+#include <libusb.h>
#include "ftdi.h"
uint8_t *ptr = transfer->buffer;
int length = transfer->actual_length;
int numPackets = (length + packet_size - 1) / packet_size;
- int res;
+ int res = 0;
for (i = 0; i < numPackets; i++)
{
int bufferSize = packetsPerTransfer * ftdi->max_packet_size;
int xferIndex;
int err = 0;
+
+ /* Only FT2232H and FT232H know about the synchronous FIFO Mode*/
+ if ((ftdi->type != TYPE_2232H) && (ftdi->type != TYPE_232H))
+ {
+ fprintf(stderr,"Device doesn't support synchronous FIFO mode\n");
+ return 1;
+ }
/* We don't know in what state we are, switch to reset*/
if (ftdi_set_bitmode(ftdi, 0xff, BITMODE_RESET) < 0)