Hi da!
Nutze folgendes .ulp um mit einem FTDI-USBchip zu reden:
https://www.autoitscript.com/forum/topic/92441-ftd2xxdll-udf/?do=findComment&comment=664401
Das funktioniert soweit auch alles supi, jedoch beim EEprom lesen knallt es und AutoIt bricht ab.
Es geht um den Funktionsaufruf "_FT_EE_Read".
Leider verstehe ich nicht, wie ich das zweite Argument für den Funktionsaufruf zu definieren habe
Hier einmal die Funktion der .ulp:
Code
; #FUNCTION# ;===============================================================================
;
; Name...........: FT_EE_Read
; Description ...: Read the contents of the EEPROM.
;
; Syntax.........: FT_EE_Read ($FT_HANDLE)
;
; Parameters.....: $FT_HANDLE Handle of the device.
; $pData Pointer to structure of type FT_PROGRAM_DATA.
;
; Return values .: Sucess - 0 if successful,
; Failure - the return value is an FT error code.
; |x - use _USBFT_ErrorDescription(x) for more detailed information
;
; Author ........: Neil Jensen (wakido;NBJ)
; Modified.......:
; Remarks .......: Part of the FTD2XX.dll EEPROM Programming Interface
; This function interprets the parameter pData as a pointer to a structure of type
; FT_PROGRAM_DATA that contains storage for the data to be read from the EEPROM.
; The function does not perform any checks on buffer sizes, so the buffers passed in the
; FT_PROGRAM_DATA structure must be big enough to accommodate their respective strings
; (including null terminators). The sizes shown in the following example are more than
; adequate and can be rounded down if necessary. The restriction is that the Manufacturer
; string length plus the Description string length is less than or equal to 40 characters.
; Note that the DLL must be informed which version of the FT_PROGRAM_DATA structure is
; being used. This is done through the Signature1, Signature2 and Version elements of the
; structure. Signature1 should always be 0x00000000, Signature2 should always be 0xFFFFFFFF
; and Version can be set to use whichever version is required. For compatibility with all current
; devices Version should be set to the latest version of the FT_PROGRAM_DATA structure which
; is defined in FTD2XX.h. See url above for more information.
; Related .......:
; Link ..........:
; Example .......:
; Original ......: FT_EE_Read(FT_HANDLE ftHandle, PFT_PROGRAM_DATA pData)
;==========================================================================================
Func _FT_EE_Read($FT_HANDLE, $pData)
$v_Result = DllCall($v_Dll, 'long', 'FT_EE_Read', 'ptr', $FT_HANDLE, 'ptr', DllStructGetPtr($pData))
Return $v_Result[0]
EndFunc ;==>_FT_EE_Read
Alles anzeigen
Hat hier schon jemand Erfahrung mit sammeln können?