Skip to content

I have some troubles when i use ftdispi #1

@GoogleCodeExporter

Description

@GoogleCodeExporter
Hello.



I'm korean student




I have some troubles when I use ftdispi.




The source code is libftdispi-0.2.3




================================================================================
============================================================================


#include <stdio.h>

#include "ftdispi.h"




int main(int argc, char **argv)

{

        struct ftdi_context    fc;

        struct ftdispi_context fsc;

        int i;




        if (ftdi_init(&fc) < 0)

        {

                fprintf(stderr, "ftdi_init failed\n");

                return 1;

        }




        i = ftdi_usb_open_desc_index(&fc, 0x0403, 0x6011, NULL, NULL, 0);




        if (i < 0 && i != -5)

        {

                fprintf(stderr,

                        "OPEN: %s\n",

                        ftdi_get_error_string(&fc));

                exit(-1);

        }










        if( 0==ftdispi_open(&fsc, &fc, INTERFACE_B))

        {

                printf("OPEN SUCCESS\n");

        }





        if(FTDISPI_ERROR_NONE==ftdispi_setmode(&fsc, 1, 0, 0, 0, 0, 0))

        {

                printf("SETMODE SUCCESS  first %d second %d Third %d \n\n\n",fir,sec,thr);

        }




        if(FTDISPI_ERROR_NONE==ftdispi_setclock(&fsc, 50000))

        {

                printf("SETMODE SUCCESS  first %d second %d Third %d \n\n\n",fir,sec,thr);

        }




        if(FTDISPI_ERROR_NONE==ftdispi_write(&fsc, "1", 1, 0))

        {

                printf("SETMODE SUCCESS  first %d second %d Third %d \n\n\n",fir,sec,thr);

        }







        if(FTDISPI_ERROR_NONE==ftdispi_close(&fsc, 1))

        {

                printf("SETMODE SUCCESS  first %d second %d Third %d \n\n\n",fir,sec,thr);

        }






        return 0;

}




================================================================================
===================================




I  used FT2232H mini MODULE.




And I'm using INTERFACE_B 




when i execute this code 




The message is 

====================================

WR INI: usb bulk write failed 

SET CLK DIV: usb bulk write failed 

SET NO LOOP: usb bulk write failed 

WR: usb bulk write failed







=====================================




I don't know what trouble is it  :'(




I need your help PLZ 

Original issue reported on code.google.com by [email protected] on 22 Feb 2012 at 11:54

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions