libftdi Archives

Subject: RE: python ftdi.read_data

From: xantares 09 <xantares09@xxxxxxxxxxx>
To: <libftdi@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Jan 2012 09:47:30 +0000


> From: thomas.jarosch@xxxxxxxxxxxxx
> To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx; xantares09@xxxxxxxxxxx
> Subject: Re: python ftdi.read_data
> Date: Fri, 20 Jan 2012 09:56:54 +0100
>
> On Thursday, 19. January 2012 22:07:33 Chris Zeh wrote:
> > At that time, you were required to create a pointer wrapper in order
> > to do reads from the device, like so:
> > #Read the Pins (Bitbang mode)
> > pins = ftdi.new_charp()
> > ret = ftdi.ftdi_read_pins(ftdic,pins)
> > print ftdi.charp_value(pins)
> >
> > I vaguely remember seeing a message from someone who really knew SWIG
> > well and may have revamped the Python stuff. So, hope that helps, but
> > it may be completely irrelevant at this time :-)
>
> Maybe Michel knows something, he's the swig wizard. CC:ed.
>
> Thomas

Yep,

This should work:

pins = ftdi.read_pins(ftdic)

All the methods are wrapped in this style, have a look a example/complete.py

Regards,

Michou




libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread