Missing exception:
TypeError: in method 'ftdi_read_data', argument 2 of type 'unsigned char *'

-- 
You received this bug notification because you are a member of Ubuntu
ham developers, which is subscribed to libftdi in Ubuntu.
https://bugs.launchpad.net/bugs/1155973

Title:
  Python bindings for ftdi_read_data() broken

Status in “libftdi” package in Ubuntu:
  New

Bug description:
  Regarding the Python bindings for libftdi, binary package python-ftdi 0.20-1 
on precise, built from source package libftdi.
  I is not possible to use the Python bindings for function ftdi_read_data().

  Here is the C function description from the upstream documentation [1]:
  int ftdi_read_data (
                struct ftdi_context * ftdi,
                unsigned char * buf,
                int size)
  Parameters:
      ftdi      pointer to ftdi_context
      buf       Buffer to store data in
      size      Size of the buffer
  Return values:
      -666:     USB device unavailable
      <0:       error code from libusb_bulk_transfer()
      0:                no data was available
      >0:       number of bytes read

  All my attempts to use the Python binding of this function failed.
  Example:
        ReadData = ctypes.c_char * readCount
        readData = ReadData()
        actualReadCount = ftdi.ftdi_read_data(ftdiContext, 
ctypes.byref(readData), readCount)
  Gives exception:

  I am quite sure that there is no way to use it correctly.
  The usage examples in the source package leave out the read function.

  [1] http://www.intra2net.com/en/developer/libftdi/documentation/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libftdi/+bug/1155973/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-hams-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-hams-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to