libftdi Archives
|
From: | "Robert Schilling" <Fun_Extra_300@xxxxxxx> |
---|---|
To: | libftdi@xxxxxxxxxxxxxxxxxxxxxxx |
Date: | Tue, 9 Apr 2013 15:19:01 +0200 (CEST) |
I'm using a U232HM module in bitbang mode and libftdi using the python api.
class FtdiSwitch:
def __init__(self): self.__ftdic = ftdi.new() if self.__ftdic == 0: raise Exception("Error creating USB device", self.name()) ret = ftdi.usb_open(self.__ftdic, 0x0403, 0x6014) if ret < 0: raise Exception("Error opening USB device", self.name()) if ftdi.set_bitmode(self.__ftdic, 0xFF, ftdi.BITMODE_BITBANG) < 0: raise Exception("Error switching to bitbang mode", self.name()) def set_port(self, value):
ftdi.write_data(self.__ftdic, chr(value), 1) This code snippet accesses the first port of the U232HM module. Since this module has 2 ports, I also would to access the second port.
How could I archive this using libftdi?
Best regards
Robert
libftdi - see http://www.intra2net.com/en/developer/libftdi for details. |
Current Thread |
---|
|